浏览代码

ExampleRef::get_id() should be const

Andy Maloney 2 年之前
父节点
当前提交
b01f0cf99b
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      test/src/example.cpp
  2. 1 1
      test/src/example.h

+ 1 - 1
test/src/example.cpp

@@ -16,7 +16,7 @@ using namespace godot;
 int ExampleRef::instance_count = 0;
 int ExampleRef::last_id = 0;
 
-int ExampleRef::get_id() {
+int ExampleRef::get_id() const {
 	return id;
 }
 

+ 1 - 1
test/src/example.h

@@ -38,7 +38,7 @@ public:
 	ExampleRef();
 	~ExampleRef();
 
-	int get_id();
+	int get_id() const;
 };
 
 class ExampleMin : public Control {