mirror of https://github.com/axmolengine/axmol.git
Merge pull request #15633 from mogemimi/fix-msvc-warning-c4800
Suppress MSVC warning C4800
This commit is contained in:
commit
e5f1090dc1
|
@ -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:
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)));
|
||||
|
|
Loading…
Reference in New Issue