Code-style consistency improvement:

Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files.
make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type.
This commit contains no other changes aside from adding and applying clang-format-all.sh
This commit is contained in:
erwincoumans
2018-09-23 14:17:31 -07:00
parent b73b05e9fb
commit ab8f16961e
1773 changed files with 1081087 additions and 474249 deletions

View File

@@ -23,15 +23,12 @@
b3RobotSimulatorClientAPI::b3RobotSimulatorClientAPI()
{
}
b3RobotSimulatorClientAPI::~b3RobotSimulatorClientAPI()
{
}
void b3RobotSimulatorClientAPI::renderScene()
{
if (!isConnected())
@@ -54,11 +51,11 @@ void b3RobotSimulatorClientAPI::debugDraw(int debugDrawMode)
}
if (m_data->m_guiHelper)
{
b3InProcessDebugDrawInternal(m_data->m_physicsClientHandle,debugDrawMode);
b3InProcessDebugDrawInternal(m_data->m_physicsClientHandle, debugDrawMode);
}
}
bool b3RobotSimulatorClientAPI::mouseMoveCallback(float x,float y)
bool b3RobotSimulatorClientAPI::mouseMoveCallback(float x, float y)
{
if (!isConnected())
{
@@ -67,11 +64,11 @@ bool b3RobotSimulatorClientAPI::mouseMoveCallback(float x,float y)
}
if (m_data->m_guiHelper)
{
return b3InProcessMouseMoveCallback(m_data->m_physicsClientHandle, x,y)!=0;
return b3InProcessMouseMoveCallback(m_data->m_physicsClientHandle, x, y) != 0;
}
return false;
}
bool b3RobotSimulatorClientAPI::mouseButtonCallback(int button, int state, float x, float y)
bool b3RobotSimulatorClientAPI::mouseButtonCallback(int button, int state, float x, float y)
{
if (!isConnected())
{
@@ -80,13 +77,11 @@ bool b3RobotSimulatorClientAPI::mouseButtonCallback(int button, int state, float
}
if (m_data->m_guiHelper)
{
return b3InProcessMouseButtonCallback(m_data->m_physicsClientHandle, button,state,x,y)!=0;
return b3InProcessMouseButtonCallback(m_data->m_physicsClientHandle, button, state, x, y) != 0;
}
return false;
}
bool b3RobotSimulatorClientAPI::connect(int mode, const std::string& hostName, int portOrKey)
{
if (m_data->m_physicsClientHandle)
@@ -102,13 +97,13 @@ bool b3RobotSimulatorClientAPI::connect(int mode, const std::string& hostName, i
switch (mode)
{
case eCONNECT_EXISTING_EXAMPLE_BROWSER:
case eCONNECT_EXISTING_EXAMPLE_BROWSER:
{
sm = b3CreateInProcessPhysicsServerFromExistingExampleBrowserAndConnect(m_data->m_guiHelper);
break;
}
case eCONNECT_GUI:
case eCONNECT_GUI:
{
int argc = 0;
char* argv[1] = {0};
@@ -119,7 +114,7 @@ bool b3RobotSimulatorClientAPI::connect(int mode, const std::string& hostName, i
#endif
break;
}
case eCONNECT_GUI_SERVER:
case eCONNECT_GUI_SERVER:
{
int argc = 0;
char* argv[1] = {0};
@@ -130,12 +125,12 @@ bool b3RobotSimulatorClientAPI::connect(int mode, const std::string& hostName, i
#endif
break;
}
case eCONNECT_DIRECT:
case eCONNECT_DIRECT:
{
sm = b3ConnectPhysicsDirect();
break;
}
case eCONNECT_SHARED_MEMORY:
case eCONNECT_SHARED_MEMORY:
{
if (portOrKey >= 0)
{
@@ -144,7 +139,7 @@ bool b3RobotSimulatorClientAPI::connect(int mode, const std::string& hostName, i
sm = b3ConnectSharedMemory(key);
break;
}
case eCONNECT_UDP:
case eCONNECT_UDP:
{
if (portOrKey >= 0)
{
@@ -159,7 +154,7 @@ bool b3RobotSimulatorClientAPI::connect(int mode, const std::string& hostName, i
break;
}
case eCONNECT_TCP:
case eCONNECT_TCP:
{
if (portOrKey >= 0)
{
@@ -173,16 +168,16 @@ bool b3RobotSimulatorClientAPI::connect(int mode, const std::string& hostName, i
#endif //BT_ENABLE_CLSOCKET
break;
}
case eCONNECT_GRPC:
{
case eCONNECT_GRPC:
{
#ifdef BT_ENABLE_GRPC
sm = b3ConnectPhysicsGRPC(hostName.c_str(), tcpPort);
sm = b3ConnectPhysicsGRPC(hostName.c_str(), tcpPort);
#else
b3Warning("GRPC is not enabled in this pybullet build");
b3Warning("GRPC is not enabled in this pybullet build");
#endif
break;
}
default:
break;
}
default:
{
b3Warning("connectPhysicsServer unexpected argument");
}