fix compiling error (#2113)

id is a keyword in objective-c
This commit is contained in:
minggo
2020-02-11 14:48:20 +08:00
committed by GitHub
parent 36b21d4bd0
commit 445a2c883e
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -15,7 +15,8 @@ class CC_CORE_API GFXShader : public Object {
virtual void destroy() = 0;
CC_INLINE GFXDevice* device() const { return _device; }
CC_INLINE uint id() const { return _hash; }
// Can not rename to `id` as JS code, because `id` is a keyword in objective-c.
CC_INLINE uint hash() const { return _hash; }
CC_INLINE const String& name() const { return _name; }
CC_INLINE const GFXShaderStageList& stages() const { return _stages; }
CC_INLINE const GFXUniformBlockList& blocks() const { return _blocks; }
+1 -1
View File
@@ -60,7 +60,7 @@ skip = GFXBindingLayout::[GFXBindingLayout device bindingUnits],
GFXCommandAllocator::[device],
CCMTLCommandAllocator::[clearCommands]
rename_functions =
rename_functions = GFXShader::[hash=id]
rename_classes =