Merge pull request #4515 from ricardoquesada/more_warning_fixes

More warning fixes
This commit is contained in:
Ricardo Quesada 2013-12-17 14:34:29 -08:00
commit 9f10054a99
4 changed files with 11 additions and 12 deletions

View File

@ -23,7 +23,7 @@ QuadCommand::QuadCommand()
_quad = nullptr;
}
void QuadCommand::init(int viewport, int32_t depth, GLuint textureID, GLProgram* shader, BlendFunc blendType, V3F_C4B_T2F_Quad* quad, int quadCount, const kmMat4 &mv)
void QuadCommand::init(int viewport, int32_t depth, GLuint textureID, GLProgram* shader, BlendFunc blendType, V3F_C4B_T2F_Quad* quad, ssize_t quadCount, const kmMat4 &mv)
{
_viewport = viewport;
_depth = depth;

View File

@ -23,7 +23,7 @@ public:
~QuadCommand();
public:
void init(int viewport, int32_t depth, GLuint texutreID, GLProgram* shader, BlendFunc blendType, V3F_C4B_T2F_Quad* quad, int quadCount,
void init(int viewport, int32_t depth, GLuint texutreID, GLProgram* shader, BlendFunc blendType, V3F_C4B_T2F_Quad* quad, ssize_t quadCount,
const kmMat4& mv);
// +----------+----------+-----+-----------------------------------+
@ -44,7 +44,7 @@ public:
inline V3F_C4B_T2F_Quad* getQuad() { return _quad; }
inline int getQuadCount() { return _quadCount; }
inline ssize_t getQuadCount() { return _quadCount; }
inline GLProgram* getShader() { return _shader; }
@ -70,8 +70,8 @@ protected:
BlendFunc _blendType;
V3F_C4B_T2F_Quad* _quad;
int _quadCount;
int _capacity;
ssize_t _quadCount;
ssize_t _capacity;
public:
friend class RenderCommandPool<QuadCommand>;

View File

@ -73,7 +73,7 @@ bool ActionObject::getLoop()
void ActionObject::setUnitTime(float fTime)
{
_fUnitTime = fTime;
int nodeNum = _actionNodeList->count();
auto nodeNum = _actionNodeList->count();
for ( int i = 0; i < nodeNum; i++ )
{
ActionNode* actionNode = (ActionNode*)_actionNodeList->getObjectAtIndex(i);
@ -139,7 +139,7 @@ void ActionObject::play()
{
stop();
this->updateToFrameByTime(0.0f);
int frameNum = _actionNodeList->count();
auto frameNum = _actionNodeList->count();
for ( int i = 0; i < frameNum; i++ )
{
ActionNode* actionNode = (ActionNode*)_actionNodeList->getObjectAtIndex(i);
@ -158,7 +158,7 @@ void ActionObject::pause()
void ActionObject::stop()
{
int frameNum = _actionNodeList->count();
auto frameNum = _actionNodeList->count();
for ( int i = 0; i < frameNum; i++ )
{
@ -174,7 +174,7 @@ void ActionObject::updateToFrameByTime(float fTime)
{
_currentTime = fTime;
int nodeNum = _actionNodeList->count();
auto nodeNum = _actionNodeList->count();
for ( int i = 0; i < nodeNum; i++ )
{
@ -189,7 +189,7 @@ void ActionObject::simulationActionUpdate(float dt)
if (_loop)
{
bool isEnd = true;
int nodeNum = _actionNodeList->count();
auto nodeNum = _actionNodeList->count();
for ( int i = 0; i < nodeNum; i++ )
{

View File

@ -73,7 +73,6 @@ void _SkeletonJson_setError (SkeletonJson* self, Json* root, const char* value1,
static float toColor (const char* value, int index) {
char digits[3];
char *error;
int color;
if (strlen(value) != 8) return -1;
value += index * 2;
@ -81,7 +80,7 @@ static float toColor (const char* value, int index) {
digits[0] = *value;
digits[1] = *(value + 1);
digits[2] = '\0';
color = strtoul(digits, &error, 16);
auto color = strtoul(digits, &error, 16);
if (*error != 0) return -1;
return color / (float)255;
}