Fix ci warnings [ci build]

This commit is contained in:
halx99 2021-04-26 17:28:58 +08:00
parent ff24bdf192
commit 68a40694a8
6 changed files with 6 additions and 13 deletions

View File

@ -231,7 +231,7 @@ void Director::setDefaultValues()
// PVR v2 has alpha premultiplied ?
bool pvr_alpha_premultiplied = conf->getValue("cocos2d.x.texture.pvrv2_has_alpha_premultiplied", Value(false)).asBool();
Image::setPVRImagesHavePremultipliedAlpha(pvr_alpha_premultiplied);
Image::setCompressedImagesHavePMA(Image::CompressedImagePMAFlag::PVR, pvr_alpha_premultiplied);
}
void Director::setGLDefaultValues()

View File

@ -187,9 +187,9 @@ namespace ui {
if (!utf8Text.empty() && length > 0) {
// get the delete byte number
size_t deleteLen = 1; // default, erase 1 byte
int deleteLen = 1; // default, erase 1 byte
while ((length - deleteLen >= 0) && 0x80 == (0xC0 & utf8Text.at(length - deleteLen)))
while (length >= deleteLen && 0x80 == (0xC0 & utf8Text.at(length - deleteLen)))
{
++deleteLen;
}
@ -211,7 +211,7 @@ namespace ui {
// get the delete byte number
size_t addLen = 1; // default, erase 1 byte
while ((length + addLen < utf8Text.size()) && 0x80 == (0xC0 & utf8Text.at(length + addLen)))
while ((length + addLen) < utf8Text.size() && 0x80 == (0xC0 & utf8Text.at(length + addLen)))
{
++addLen;
}
@ -424,7 +424,6 @@ namespace ui {
switch (code)
{
case EventKeyboard::KeyCode::KEY_LEFT_ARROW:
cocos2d::log("******** Move Left ********* ");
this->__moveCursor(-1);
break;
case EventKeyboard::KeyCode::KEY_RIGHT_ARROW:
@ -434,6 +433,7 @@ namespace ui {
case EventKeyboard::KeyCode::KEY_KP_DELETE:
this->handleDeleteKeyEvent();
break;
default:;
}
}
};

View File

@ -7,7 +7,6 @@ CCArmatureDisplay* CCArmatureDisplay::create()
{
CCArmatureDisplay* displayContainer = new (std::nothrow) CCArmatureDisplay();
if (displayContainer && displayContainer->init())
if (displayContainer)
{
displayContainer->autorelease();
}

View File

@ -850,11 +850,6 @@ void DeformTimelineState::init(Armature* armature, AnimationState* animationStat
const auto frameIntOffset = _animationData->frameIntOffset + _timelineArray[_timelineData->offset + (unsigned)BinaryOffset::TimelineFrameValueCount];
vertexOffset = _frameIntArray[frameIntOffset + (unsigned)BinaryOffset::DeformVertexOffset];
if (vertexOffset < 0)
{
vertexOffset += 65536; // Fixed out of bouds bug.
}
_deformCount = _frameIntArray[frameIntOffset + (unsigned)BinaryOffset::DeformCount];
_valueCount = _frameIntArray[frameIntOffset + (unsigned)BinaryOffset::DeformValueCount];
_valueOffset = _frameIntArray[frameIntOffset + (unsigned)BinaryOffset::DeformValueOffset];

View File

@ -93,7 +93,7 @@ void Armature::_sortZOrder(const int16_t* slotIndices, unsigned offset)
for (std::size_t i = 0, l = slotDatas.size(); i < l; ++i)
{
const auto slotIndex = isOriginal ? i : (std::size_t)slotIndices[offset + i];
if (slotIndex < 0 || slotIndex >= l)
if (slotIndex >= l)
{
continue;
}

View File

@ -213,7 +213,6 @@ std::pair<void*, DisplayType> BaseFactory::_getSlotDisplay(const BuildArmaturePa
dataName = displayData->parent->parent->parent->name;
}
}
dataPackage != nullptr ? dataPackage->dataName : displayData->parent->parent->parent->name;
std::pair<void*, DisplayType> display(nullptr, DisplayType::Image);
switch (displayData->type)