You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by wa...@apache.org on 2022/10/20 10:29:28 UTC

[incubator-pegasus] branch master updated: fix: fix wrong comments for down_cast (#1194)

This is an automated email from the ASF dual-hosted git repository.

wangdan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git


The following commit(s) were added to refs/heads/master by this push:
     new e4bca55d1 fix: fix wrong comments for down_cast (#1194)
e4bca55d1 is described below

commit e4bca55d1b3278d5d0929434fffe0cb4f2459a9f
Author: Dan Wang <wa...@apache.org>
AuthorDate: Thu Oct 20 18:29:23 2022 +0800

    fix: fix wrong comments for down_cast (#1194)
---
 src/rdsn/src/utils/casts.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/rdsn/src/utils/casts.h b/src/rdsn/src/utils/casts.h
index fb08f8f9e..98f6ccfa7 100644
--- a/src/rdsn/src/utils/casts.h
+++ b/src/rdsn/src/utils/casts.h
@@ -31,10 +31,10 @@ namespace dsn {
 template <typename To, typename From>
 inline To down_cast(From *from)
 {
-    // Perform a compile-time assertion to check whether <From> class is derived from <To> class.
+    // Perform a compile-time assertion to check whether <To> class is derived from <From> class.
     static_assert(std::is_base_of<typename std::remove_pointer<From>::type,
                                   typename std::remove_pointer<To>::type>::value,
-                  "<From> class is not derived from <To> class");
+                  "<To> class is not derived from <From> class");
 
     // Use RTTI to do double-check, though in practice the unit tests are seldom built in debug
     // mode. For example, the unit tests of github CI for both rDSN and Pegasus are built in


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org