Explorar el Código

Rename 'wrap_property' to 'wrap_field'

Ole hace 10 años
padre
commit
c3e858a496
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. 2 2
      examples/usertypes.cpp
  2. 2 2
      lib/luwra/usertypes.hpp

+ 2 - 2
examples/usertypes.cpp

@@ -38,8 +38,8 @@ int main() {
 		// Methods which shall be availabe in the Lua user data, need to be declared here
 		{
 			{"scale", luwra::wrap_method<Point, void(double), &Point::scale>},
-			{"x",     luwra::wrap_property<Point, double, &Point::x>},
-			{"y",     luwra::wrap_property<Point, double, &Point::y>}
+			{"x",     luwra::wrap_field<Point, double, &Point::x>},
+			{"y",     luwra::wrap_field<Point, double, &Point::y>}
 		},
 		// Meta methods may be registered aswell
 		{

+ 2 - 2
lib/luwra/usertypes.hpp

@@ -325,14 +325,14 @@ constexpr CFunction wrap_method =
  *
  * The wrapped property accessor is also a function:
  *
- *   CFunction wrapped_property = wrap_property<T, R, &T::my_property>;
+ *   CFunction wrapped_property = wrap_field<T, R, &T::my_property>;
  */
 template <
 	typename T,
 	typename R,
 	R T::* property_pointer
 >
-constexpr CFunction wrap_property =
+constexpr CFunction wrap_field =
 	&internal::PropertyWrapper<T, R>::template invoke<property_pointer>;
 
 /**