Skip to content

Commit 4d4b771

Browse files
committed
Merge 'clang-tidy-readability-redundant-control-flow'
2 parents 0eb0a36 + acf0e7a commit 4d4b771

File tree

5 files changed

+1
-13
lines changed

5 files changed

+1
-13
lines changed

.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Checks: >
1010
performance-type-promotion-in-math-fn,
1111
readability-container-size-empty,
1212
readability-delete-null-pointer,
13+
readability-redundant-control-flow,
1314
readability-redundant-string-cstr,
1415
1516
WarningsAsErrors: '*'

cocos/2d/CCActionInterval.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2425,7 +2425,6 @@ DelayTime* DelayTime::clone() const
24252425

24262426
void DelayTime::update(float /*time*/)
24272427
{
2428-
return;
24292428
}
24302429

24312430
DelayTime* DelayTime::reverse() const

cocos/3d/CCOBB.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ static void _getEigenVectors(Mat4* vout, Vec3* dout, Mat4 a)
178178
v.transpose();
179179
*vout = v;
180180
*dout = d;
181-
return;
182181
}
183182

184183
static Mat4 _getOBBOrientation(const Vec3* vertPos, int num)

cocos/network/SocketIO.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,6 @@ void SIOClientImpl::handshake()
441441
HttpClient::getInstance()->send(request);
442442

443443
request->release();
444-
445-
return;
446444
}
447445

448446
void SIOClientImpl::handshakeResponse(HttpClient* /*sender*/, HttpResponse *response)
@@ -562,9 +560,6 @@ void SIOClientImpl::handshakeResponse(HttpClient* /*sender*/, HttpResponse *resp
562560
_timeout = timeout;
563561

564562
openSocket();
565-
566-
return;
567-
568563
}
569564

570565
void SIOClientImpl::openSocket()
@@ -593,8 +588,6 @@ void SIOClientImpl::openSocket()
593588
{
594589
CC_SAFE_DELETE(_ws);
595590
}
596-
597-
return;
598591
}
599592

600593
bool SIOClientImpl::init()
@@ -1004,8 +997,6 @@ void SIOClientImpl::onMessage(WebSocket* /*ws*/, const WebSocket::Data& data)
1004997
}
1005998
break;
1006999
}
1007-
1008-
return;
10091000
}
10101001

10111002
void SIOClientImpl::onClose(WebSocket* /*ws*/)

tests/cpp-tests/Classes/PhysicsTest/PhysicsTest.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,8 +1593,6 @@ void PhysicsPositionRotationTest::onEnter()
15931593
body->setRotationOffset(45);
15941594
body->setTag(DRAG_BODYS_TAG);
15951595
addChild(offsetPosNode);
1596-
1597-
return;
15981596
}
15991597

16001598
std::string PhysicsPositionRotationTest::title() const

0 commit comments

Comments
 (0)