Skip to content

Commit

Permalink
Fix some ci warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Jul 23, 2024
1 parent b4667ac commit a39b2e8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
24 changes: 12 additions & 12 deletions tests/cpp-tests/Source/DrawNodeExTest/DrawNodeExTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class DrawNodePictureTest : public DrawNodeExBaseTest

virtual std::string title() const override;
virtual std::string subtitle() const override;
void update(float dt);
void update(float dt) override;

private:
ax::extension::DrawNodeEx* drawNodeEx;
Expand All @@ -63,7 +63,7 @@ class DrawNodeMorphTest : public DrawNodeExBaseTest

virtual std::string title() const override;
virtual std::string subtitle() const override;
void update(float dt);
void update(float dt) override;

private:
ax::extension::DrawNodeEx* drawNodeEx;
Expand Down Expand Up @@ -96,7 +96,7 @@ class DrawNodeFireworkTest : public DrawNodeExBaseTest

virtual std::string title() const override;
virtual std::string subtitle() const override;
void update(float dt);
void update(float dt) override;

fireObj* createFireObjs(int count);

Expand Down Expand Up @@ -174,7 +174,7 @@ class DrawNodeThicknessTest : public DrawNodeExBaseTest

virtual std::string title() const override;
virtual std::string subtitle() const override;
void update(float dt);
void update(float dt) override;

void initSliders();
void changeThickness(ax::Object* pSender, ax::ui::Slider::EventType type);
Expand All @@ -198,7 +198,7 @@ class DrawNodeVersionsTest : public DrawNodeExBaseTest

virtual std::string title() const override;
virtual std::string subtitle() const override;
void update(float dt);
void update(float dt) override;

private:
ax::extension::DrawNodeEx* drawNodeEx;
Expand All @@ -225,7 +225,7 @@ class DrawNodePieTest : public DrawNodeExBaseTest

virtual std::string title() const override;
virtual std::string subtitle() const override;
void update(float dt);
void update(float dt) override;

void initSliders();
void changeStartAngle(ax::Object* pSender, ax::ui::Slider::EventType type);
Expand Down Expand Up @@ -254,7 +254,7 @@ class DrawNodeMethodesTest : public DrawNodeExBaseTest

virtual std::string title() const override;
virtual std::string subtitle() const override;
void update(float dt);
void update(float dt) override;

void sliderCallback(ax::Object* sender, ax::ui::Slider::EventType type);
void listviewCallback(ax::Object* sender, ax::ui::ListView::EventType type);
Expand Down Expand Up @@ -288,7 +288,7 @@ class DrawNodePerformaneTest : public DrawNodeExBaseTest

virtual std::string title() const override;
virtual std::string subtitle() const override;
void update(float dt);
void update(float dt) override;

void sliderCallback(ax::Object* sender, ax::ui::Slider::EventType type);
void listviewCallback(ax::Object* sender, ax::ui::ListView::EventType type);
Expand Down Expand Up @@ -319,7 +319,7 @@ class DrawNodeHeartTest : public DrawNodeExBaseTest

virtual std::string title() const override;
virtual std::string subtitle() const override;
void update(float dt);
void update(float dt) override;

private:
ax::extension::DrawNodeEx* drawNodeEx;
Expand All @@ -338,7 +338,7 @@ class DrawNodeDrawInWrongOrder_Issue1888 : public DrawNodeExBaseTest

virtual std::string title() const override;
virtual std::string subtitle() const override;
void update(float dt);
void update(float dt) override;

private:
ax::extension::DrawNodeEx* drawNodeEx;
Expand Down Expand Up @@ -380,7 +380,7 @@ class DrawNodeCocos2dxBetterCircleRendering : public DrawNodeExBaseTest

virtual std::string title() const override;
virtual std::string subtitle() const override;
void update(float dt);
void update(float dt) override;

void initSliders();
void changeThreshold(Object* pSender, ax::ui::Slider::EventType type);
Expand Down Expand Up @@ -426,7 +426,7 @@ class DrawNodeCocos2dxDrawNodePieTest : public DrawNodeExBaseTest

virtual std::string title() const override;
virtual std::string subtitle() const override;
void update(float dt);
void update(float dt) override;

void initSliders();
void changeStartAngle(Object* pSender, ax::ui::Slider::EventType type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ void AsyncLoadMeshRendererTest::menuCallback_asyncLoadMesh(Object* sender)
int32_t index = 0;
for (const auto& path : _paths)
{
MeshRenderer::createAsync(path, AX_CALLBACK_2(AsyncLoadMeshRendererTest::asyncLoad_Callback, this), (void*)index++);
MeshRenderer::createAsync(path, AX_CALLBACK_2(AsyncLoadMeshRendererTest::asyncLoad_Callback, this), reinterpret_cast<void*>(static_cast<uintptr_t>(++index)));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void WebSocketTest::startTestCallback(Object* sender)
void WebSocketTest::onOpen(network::WebSocket* ws)
{
char status[256] = {0};
sprintf(status, "Opened, url: %s, protocol: %s", ws->getUrl().data(), ws->getProtocol().data());
fmt::format_to(status, "Opened, url: {}, protocol: {}", ws->getUrl(), ws->getProtocol());

AXLOGI("Websocket ({}) was opened, url: {}, protocol: {}", fmt::ptr(ws), ws->getUrl(), ws->getProtocol());
if (ws == _wsiSendText)
Expand Down Expand Up @@ -221,7 +221,7 @@ void WebSocketTest::onMessage(network::WebSocket* ws, const network::WebSocket::
{
_sendBinaryTimes++;
char times[100] = {0};
sprintf(times, "%d", _sendBinaryTimes);
fmt::format_to(times, "{}", _sendBinaryTimes);

std::string binaryStr = "response bin msg: ";

Expand Down Expand Up @@ -271,7 +271,7 @@ void WebSocketTest::onError(network::WebSocket* ws, const network::WebSocket::Er
{
AXLOGD("Error was fired, error code: {}", static_cast<int>(error));
char buf[100] = {0};
sprintf(buf, "An error was fired, code: %s", static_cast<int>(error));
fmt::format_to(buf, "An error was fired, code: {}", static_cast<int>(error));

if (ws == _wsiSendText)
{
Expand Down Expand Up @@ -521,7 +521,7 @@ void WebSocketDelayTest::doReceiveText()
void WebSocketDelayTest::onOpen(network::WebSocket* ws)
{
char status[256] = {0};
sprintf(status, "Opened, url: %s, protocol: %s", ws->getUrl(), ws->getProtocol());
fmt::format_to(status, "Opened, url: {}, protocol: {}", ws->getUrl(), ws->getProtocol());

AXLOGD("Websocket ({}) was opened, url: {}, protocol: {}", fmt::ptr(ws), ws->getUrl(), ws->getProtocol());
if (ws == _wsiSendText)
Expand All @@ -536,7 +536,7 @@ void WebSocketDelayTest::onMessage(network::WebSocket* ws, const network::WebSoc
{
_receiveTextTimes++;
char times[100] = {0};
sprintf(times, "%d", _receiveTextTimes);
fmt::format_to(times, "{}", _receiveTextTimes);
std::string textStr = std::string("response text msg: ") + data.bytes + ", " + times;
AXLOGD("{}", textStr);
doReceiveText();
Expand All @@ -563,7 +563,7 @@ void WebSocketDelayTest::onError(network::WebSocket* ws, const network::WebSocke
{
AXLOGD("Error was fired, error code: {}", static_cast<int>(error));
char buf[100] = {0};
sprintf(buf, "An error was fired, code: %d", static_cast<int>(error));
fmt::format_to(buf, "An error was fired, code: {}", static_cast<int>(error));

if (ws == _wsiSendText)
{
Expand Down

0 comments on commit a39b2e8

Please sign in to comment.