Browse Source

[cpp] AtlasRegion::getName returns const String & instead of String.

Mario Zechner 1 month ago
parent
commit
94e5e74e8a

+ 5 - 0
spine-c/src/generated/atlas_region.cpp

@@ -21,6 +21,11 @@ spine_atlas_page spine_atlas_region_get_page(spine_atlas_region self) {
 	return (spine_atlas_page) _self->getPage();
 }
 
+const char *spine_atlas_region_get_name(spine_atlas_region self) {
+	AtlasRegion *_self = (AtlasRegion *) self;
+	return _self->getName().buffer();
+}
+
 int spine_atlas_region_get_index(spine_atlas_region self) {
 	AtlasRegion *_self = (AtlasRegion *) self;
 	return _self->getIndex();

+ 1 - 0
spine-c/src/generated/atlas_region.h

@@ -15,6 +15,7 @@ SPINE_C_API void spine_atlas_region_dispose(spine_atlas_region self);
 
 SPINE_C_API spine_rtti spine_atlas_region_get_rtti(spine_atlas_region self);
 SPINE_C_API spine_atlas_page spine_atlas_region_get_page(spine_atlas_region self);
+SPINE_C_API const char *spine_atlas_region_get_name(spine_atlas_region self);
 SPINE_C_API int spine_atlas_region_get_index(spine_atlas_region self);
 SPINE_C_API int spine_atlas_region_get_x(spine_atlas_region self);
 SPINE_C_API int spine_atlas_region_get_y(spine_atlas_region self);

+ 1 - 1
spine-cpp/include/spine/Atlas.h

@@ -124,7 +124,7 @@ namespace spine {
 		AtlasPage *getPage() const {
 			return _page;
 		}
-		String getName() const {
+		const String &getName() const {
 			return _name;
 		}
 		int getIndex() const {