Browse Source

any: add comments for things to cleanup :)

skypjack 5 tháng trước cách đây
mục cha
commit
38b34eb986
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/entt/core/any.hpp

+ 2 - 0
src/entt/core/any.hpp

@@ -439,6 +439,7 @@ public:
      * @return True in case of success, false otherwise.
      */
     bool assign(const basic_any &other) {
+        // it could be a call across boundaries, but still for the same type
         if(vtable && (mode != any_policy::cref) && ((vtable == other.vtable) || has_value(other.info()))) {
             return (vtable(request::assign, *this, other.data()) != nullptr);
         }
@@ -449,6 +450,7 @@ public:
     /*! @copydoc assign */
     // NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved)
     bool assign(basic_any &&other) {
+        // it could be a call across boundaries, but still for the same type
         if(vtable && (mode != any_policy::cref) && ((vtable == other.vtable) || has_value(other.info()))) {
             if(auto *val = other.data(); val) {
                 return (vtable(request::transfer, *this, val) != nullptr);