瀏覽代碼

Merge pull request #2027 from rilian-la-te/fix-any-cast

CSerializer: fix any_cast
Ivan Savenko 2 年之前
父節點
當前提交
ff5e98e78b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/serializer/CSerializer.h

+ 1 - 1
lib/serializer/CSerializer.h

@@ -103,7 +103,7 @@ public:
 #ifndef __APPLE__
 #ifndef __APPLE__
 			assert(i->second.type() == typeid(VectorizedObjectInfo<T, U>));
 			assert(i->second.type() == typeid(VectorizedObjectInfo<T, U>));
 #endif
 #endif
-			VectorizedObjectInfo<T, U> *ret = std::any_cast<VectorizedObjectInfo<T, U>*>(i->second);
+			auto *ret = std::any_cast<VectorizedObjectInfo<T, U>>(&i->second);
 			return ret;
 			return ret;
 		}
 		}
 	}
 	}