Merge pull request #15633 from mogemimi/fix-msvc-warning-c4800

Suppress MSVC warning C4800
This commit is contained in:
minggo 2016-05-16 15:46:30 +08:00
commit e5f1090dc1
4 changed files with 4 additions and 4 deletions

View File

@ -161,7 +161,7 @@ namespace cocostudio
float intensity = options->intensity();
float range = options->range();
float outerAngle = options->outerAngle()*0.5f;
bool enabled = options->enabled();
bool enabled = (options->enabled() != 0);
switch (type)
{
case cocos2d::LightType::DIRECTIONAL:

View File

@ -180,7 +180,7 @@ void TabControlReader::setPropsWithFlatBuffers(cocos2d::Node* node, const flatbu
auto options = (flatbuffers::TabControlOption*)nodeOption;
int headerPlace = options->headerPlace();
tabControl->ignoreHeadersTextureSize((bool)options->ignoreHeaderTextureSize());
tabControl->ignoreHeadersTextureSize(options->ignoreHeaderTextureSize() != 0);
tabControl->setHeaderDockPlace((cocos2d::ui::TabControl::Dock)headerPlace);
tabControl->setHeaderWidth(options->headerWidth());
tabControl->setHeaderHeight(options->headerHeight());

View File

@ -811,7 +811,7 @@ void WebSocket::onClientReceivedData(void* in, ssize_t len)
ssize_t frameSize = frameData->size();
bool isBinary = lws_frame_is_binary(_wsInstance);
bool isBinary = (lws_frame_is_binary(_wsInstance) != 0);
if (!isBinary)
{

View File

@ -2126,7 +2126,7 @@ bool Image::initWithWebpData(const unsigned char * data, ssize_t dataLen)
_height = config.input.height;
//we ask webp to give data with premultiplied alpha
_hasPremultipliedAlpha = config.input.has_alpha;
_hasPremultipliedAlpha = (config.input.has_alpha != 0);
_dataLen = _width * _height * (config.input.has_alpha?4:3);
_data = static_cast<unsigned char*>(malloc(_dataLen * sizeof(unsigned char)));