mirror of https://github.com/axmolengine/axmol.git
issue #2378: Deprecating some getters. Getter function needs to have 'get' prefix.
This commit is contained in:
parent
8ad6fbd415
commit
c7cf577b1a
|
@ -206,7 +206,7 @@ void TMXTiledMap::buildWithMapInfo(TMXMapInfo* mapInfo)
|
|||
}
|
||||
|
||||
// public
|
||||
TMXLayer * TMXTiledMap::layerNamed(const char *layerName)
|
||||
TMXLayer * TMXTiledMap::getLayerNamed(const char *layerName) const
|
||||
{
|
||||
CCASSERT(layerName != NULL && strlen(layerName) > 0, "Invalid layer name!");
|
||||
Object* pObj = NULL;
|
||||
|
@ -226,7 +226,7 @@ TMXLayer * TMXTiledMap::layerNamed(const char *layerName)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
TMXObjectGroup * TMXTiledMap::objectGroupNamed(const char *groupName)
|
||||
TMXObjectGroup * TMXTiledMap::getObjectGroupNamed(const char *groupName) const
|
||||
{
|
||||
CCASSERT(groupName != NULL && strlen(groupName) > 0, "Invalid group name!");
|
||||
|
||||
|
@ -249,14 +249,14 @@ TMXObjectGroup * TMXTiledMap::objectGroupNamed(const char *groupName)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
String* TMXTiledMap::propertyNamed(const char *propertyName)
|
||||
String* TMXTiledMap::getPropertyNamed(const char *propertyName) const
|
||||
{
|
||||
return (String*)_properties->objectForKey(propertyName);
|
||||
return static_cast<String*>(_properties->objectForKey(propertyName));
|
||||
}
|
||||
|
||||
Dictionary* TMXTiledMap::propertiesForGID(int GID)
|
||||
Dictionary* TMXTiledMap::getPropertiesForGID(int GID) const
|
||||
{
|
||||
return (Dictionary*)_tileProperties->objectForKey(GID);
|
||||
return static_cast<Dictionary*>(_tileProperties->objectForKey(GID));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -125,16 +125,20 @@ public:
|
|||
bool initWithXML(const char* tmxString, const char* resourcePath);
|
||||
|
||||
/** return the TMXLayer for the specific layer */
|
||||
TMXLayer* layerNamed(const char *layerName);
|
||||
TMXLayer* getLayerNamed(const char *layerName) const;
|
||||
CC_DEPRECATED_ATTRIBUTE TMXLayer* layerNamed(const char *layerName) const { return getLayerNamed(layerName); };
|
||||
|
||||
/** return the TMXObjectGroup for the specific group */
|
||||
TMXObjectGroup* objectGroupNamed(const char *groupName);
|
||||
TMXObjectGroup* getObjectGroupNamed(const char *groupName) const;
|
||||
CC_DEPRECATED_ATTRIBUTE TMXObjectGroup* objectGroupNamed(const char *groupName) const { return getObjectGroupNamed(groupName); };
|
||||
|
||||
/** return the value for the specific property name */
|
||||
String *propertyNamed(const char *propertyName);
|
||||
String *getPropertyNamed(const char *propertyName) const;
|
||||
CC_DEPRECATED_ATTRIBUTE String *propertyNamed(const char *propertyName) const { return getPropertyNamed(propertyName); };
|
||||
|
||||
/** return properties dictionary for tile GID */
|
||||
Dictionary* propertiesForGID(int GID);
|
||||
Dictionary* getPropertiesForGID(int GID) const;
|
||||
CC_DEPRECATED_ATTRIBUTE Dictionary* propertiesForGID(int GID) const { return getPropertiesForGID(GID); };
|
||||
|
||||
/** the map's size property measured in tiles */
|
||||
inline const Size& getMapSize() const { return _mapSize; };
|
||||
|
|
Loading…
Reference in New Issue