Michele Caini пре 5 година
родитељ
комит
64cc200df0
1 измењених фајлова са 7 додато и 7 уклоњено
  1. 7 7
      test/entt/meta/meta_type.cpp

+ 7 - 7
test/entt/meta/meta_type.cpp

@@ -49,8 +49,8 @@ struct clazz_t {
 };
 };
 
 
 struct overloaded_func_t {
 struct overloaded_func_t {
-    void e(int v) {
-        value = v + v;
+    int e(int v) const {
+        return v + v;
     }
     }
 
 
     int f(const base_t &, int a, int b) {
     int f(const base_t &, int a, int b) {
@@ -59,20 +59,20 @@ struct overloaded_func_t {
 
 
     int f(int a, int b) {
     int f(int a, int b) {
         value = a;
         value = a;
-        return b * b;
+        return g(b);
     }
     }
 
 
     int f(int v) const {
     int f(int v) const {
-        return v * v;
+        return g(v);
     }
     }
 
 
     float f(int a, float b) {
     float f(int a, float b) {
         value = a;
         value = a;
-        return b + b;
+        return e(b);
     }
     }
 
 
-    void g(int v) {
-        value = v * v;
+    int g(int v) const {
+        return v * v;
     }
     }
 
 
     inline static int value = 0;
     inline static int value = 0;