Merge pull request #15447 from xpol/use-decltype-to-avoid-side-effect-warnings

Use decltype and std::remove_pointer to avoid side effect warnings.
This commit is contained in:
minggo 2016-04-19 10:53:15 +08:00
commit f3d8d043a1
1 changed files with 3 additions and 2 deletions

View File

@ -24,6 +24,7 @@
****************************************************************************/
#include "deprecated/CCDictionary.h"
#include <type_traits>
#include "deprecated/CCString.h"
#include "deprecated/CCInteger.h"
#include "platform/CCFileUtils.h"
@ -584,7 +585,7 @@ __Dictionary* __Dictionary::clone() const
}
else
{
CCLOGWARN("%s isn't clonable.", typeid(*element->getObject()).name());
CCLOGWARN("%s isn't clonable.", typeid(std::remove_pointer<decltype(element->getObject())>::type).name());
}
}
}
@ -603,7 +604,7 @@ __Dictionary* __Dictionary::clone() const
}
else
{
CCLOGWARN("%s isn't clonable.", typeid(*element->getObject()).name());
CCLOGWARN("%s isn't clonable.", typeid(std::remove_pointer<decltype(element->getObject())>::type).name());
}
}
}