Skip to content

Commit

Permalink
Removed errors and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SMJSGaming committed Jun 19, 2024
1 parent eb5b647 commit 8f9f927
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/nodes/lists/JSONCodeBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void JSONCodeBlock::copyCode() {
void JSONCodeBlock::setCode(const std::pair<HttpInfo::ContentType, std::string>& code) {
const ThemeStyle& theme = ThemeStyle::getTheme();
const CCSize& fontSize = CCLabelBMFont::create("0", theme.fontName)->getContentSize() * theme.fontSize;
const CCSize& size = this->getContentSize() - CCSize({ this->getPaddingX(), this->getPaddingY() }) * 2;
const CCSize& size = this->getContentSize() - ccp(this->getPaddingX(), this->getPaddingY()) * 2;
const float cellHeight = fontSize.height + theme.lineHeight;
const float lineNumberWidth = fontSize.width * 4;
CCArray* cells = CCArray::create();
Expand Down
2 changes: 1 addition & 1 deletion src/objects/HttpInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ HttpInfo::HttpInfo(CCHttpRequest* request) : m_active(false),

m_body = body ? std::string(request->getRequestData()).substr(0, request->getRequestDataSize()) : "";
m_bodyContentType = this->determineContentType(m_body, true);
request->setResponseCallback(this, callfuncND_selector(HttpInfo::onResponse));
request->setResponseCallback(this, httpresponse_selector(HttpInfo::onResponse));
}

bool HttpInfo::isActive() {
Expand Down
5 changes: 4 additions & 1 deletion src/objects/JSONColor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ bool JSONColor::determineCharToken(const char character, const std::string& trun
return this->checkObjectTerminator(character);
}
} else {
bool accepted = m_token != TERMINATOR;
bool accepted = true;

switch (m_token) {
case STRING: {
Expand Down Expand Up @@ -101,6 +101,9 @@ bool JSONColor::determineCharToken(const char character, const std::string& trun
} else {
accepted = character == ' ';
}
} break;
default: {
accepted = false;
}
}

Expand Down

0 comments on commit 8f9f927

Please sign in to comment.