mirror of https://github.com/axmolengine/axmol.git
Remove getLong() method
Change %du to %u, and %lx to %x Use "stdint.h" instead of <cstdint> for TGAlib.h
This commit is contained in:
parent
78236079e8
commit
568e3612bd
|
@ -115,7 +115,7 @@ std::string ProfilingTimer::getDescription() const
|
|||
{
|
||||
static char s_description[512] = {0};
|
||||
|
||||
sprintf(s_description, "%s ::\tavg1: %du,\tavg2: %du,\tmin: %du,\tmax: %du,\ttotal: %.2fs,\tnr calls: %d", _nameStr.c_str(), _averageTime1, _averageTime2, minTime, maxTime, totalTime/1000000., numberOfCalls);
|
||||
sprintf(s_description, "%s ::\tavg1: %u,\tavg2: %u,\tmin: %u,\tmax: %u,\ttotal: %.2fs,\tnr calls: %d", _nameStr.c_str(), _averageTime1, _averageTime2, minTime, maxTime, totalTime/1000000., numberOfCalls);
|
||||
return s_description;
|
||||
}
|
||||
|
||||
|
|
|
@ -895,25 +895,6 @@ float Properties::getFloat(const char* name) const
|
|||
return 0.0f;
|
||||
}
|
||||
|
||||
int32_t Properties::getLong(const char* name) const
|
||||
{
|
||||
const char* valueString = getString(name);
|
||||
if (valueString)
|
||||
{
|
||||
int32_t value;
|
||||
int scanned;
|
||||
scanned = sscanf(valueString, "%d", &value);
|
||||
if (scanned != 1)
|
||||
{
|
||||
CCLOGERROR("Error attempting to parse property '%s' as a long integer.", name);
|
||||
return 0L;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
return 0L;
|
||||
}
|
||||
|
||||
bool Properties::getMat4(const char* name, Mat4* out) const
|
||||
{
|
||||
CCASSERT(out, "Invalid out");
|
||||
|
|
|
@ -327,18 +327,6 @@ public:
|
|||
*/
|
||||
float getFloat(const char* name = NULL) const;
|
||||
|
||||
/**
|
||||
* Interpret the value of the given property as a long integer.
|
||||
* If the property does not exist, zero will be returned.
|
||||
* If the property exists but could not be scanned, an error will be logged and zero will be returned.
|
||||
*
|
||||
* @param name The name of the property to interpret, or NULL to return the current property's value.
|
||||
*
|
||||
* @return The value of the given property interpreted as a long.
|
||||
* Zero if the property does not exist or could not be scanned.
|
||||
*/
|
||||
int32_t getLong(const char* name = NULL) const;
|
||||
|
||||
/**
|
||||
* Interpret the value of the given property as a Matrix.
|
||||
* If the property does not exist, out will be set to the identity matrix.
|
||||
|
|
|
@ -28,7 +28,7 @@ THE SOFTWARE.
|
|||
#define __SUPPORT_DATA_SUPPORT_TGALIB_H__
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
#include <cstdint>
|
||||
#include "stdint.h"
|
||||
|
||||
namespace cocos2d {
|
||||
|
||||
|
|
|
@ -284,7 +284,7 @@ bool Texture2D::updateWithMipmaps(MipmapInfo* mipmaps, int mipmapsNum, backend::
|
|||
auto& pfd = backend::PixelFormatUtils::getFormatDescriptor(pixelFormat);
|
||||
if (!pfd.bpp)
|
||||
{
|
||||
CCLOG("cocos2d: WARNING: unsupported pixelformat: %lx", (uint32_t)pixelFormat);
|
||||
CCLOG("cocos2d: WARNING: unsupported pixelformat: %x", (uint32_t)pixelFormat);
|
||||
#ifdef CC_USE_METAL
|
||||
CCASSERT(false, "pixeformat not found in _pixelFormatInfoTables, register required!");
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue