Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 16d7858

Browse files
committed
Format
1 parent 9345281 commit 16d7858

File tree

6 files changed

+69
-72
lines changed

6 files changed

+69
-72
lines changed

src/dynamic_graph/debug-py.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ namespace dynamicgraph {
2222
namespace python {
2323

2424
#if PY_MAJOR_VERSION == 2
25-
extern PyObject* dgpyError;
26-
# endif
25+
extern PyObject* dgpyError;
26+
#endif
2727

2828
namespace debug {
2929

@@ -35,7 +35,7 @@ PyObject* addLoggerFileOutputStream(
3535
#else
3636
PyObject*, PyObject* args
3737
#endif
38-
) {
38+
) {
3939
char* filename;
4040
if (!PyArg_ParseTuple(args, "s", &filename)) return NULL;
4141
std::string sfilename(filename);
@@ -58,7 +58,7 @@ PyObject* closeLoggerFileOutputStream(
5858
#else
5959
PyObject*, PyObject*
6060
#endif
61-
) {
61+
) {
6262
try {
6363
for (std::map<std::string, ofstreamShrPtr>::iterator it = mapOfFiles_.begin(); it != mapOfFiles_.end(); ++it) {
6464
it->second->close();
@@ -74,7 +74,7 @@ PyObject* addLoggerCoutOutputStream(
7474
#else
7575
PyObject*, PyObject*
7676
#endif
77-
) {
77+
) {
7878
try {
7979
dgADD_OSTREAM_TO_RTLOG(std::cout);
8080
}
@@ -88,7 +88,7 @@ PyObject* realTimeLoggerDestroy(
8888
#else
8989
PyObject*, PyObject*
9090
#endif
91-
) {
91+
) {
9292
try {
9393
RealTimeLogger::destroy();
9494
}
@@ -102,7 +102,7 @@ PyObject* realTimeLoggerSpinOnce(
102102
#else
103103
PyObject*, PyObject*
104104
#endif
105-
) {
105+
) {
106106
try {
107107
RealTimeLogger::instance().spinOnce();
108108
}
@@ -116,7 +116,7 @@ PyObject* realTimeLoggerInstance(
116116
#else
117117
PyObject*, PyObject*
118118
#endif
119-
) {
119+
) {
120120
try {
121121
RealTimeLogger::instance();
122122
}

src/dynamic_graph/dynamic-graph-py.cc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ namespace dynamicgraph {
1515
namespace python {
1616

1717
#if PY_MAJOR_VERSION == 2
18-
PyObject* dgpyError;
19-
# endif
18+
PyObject* dgpyError;
19+
#endif
2020

2121
/**
2222
\brief plug a signal into another one.
@@ -27,7 +27,7 @@ PyObject* plug(
2727
#else
2828
PyObject*, PyObject* args
2929
#endif
30-
) {
30+
) {
3131
PyObject* objOut = NULL;
3232
PyObject* objIn = NULL;
3333
void* pObjOut;
@@ -51,20 +51,20 @@ PyObject* plug(
5151
pObjIn = PyCapsule_GetPointer(objIn, "dynamic_graph.Signal");
5252
SignalBase<int>* signalIn = (SignalBase<int>*)pObjIn;
5353
if (signalIn == NULL) {
54-
std::ostringstream oss;
55-
oss << "dynamic_graph.plug(a, b): Argument 'b' must be of type 'dynamic_graph.Signal', but got "
56-
<< PyCapsule_GetName(objIn);
57-
PyErr_SetString(PyExc_TypeError, oss.str().c_str());
58-
return NULL;
54+
std::ostringstream oss;
55+
oss << "dynamic_graph.plug(a, b): Argument 'b' must be of type 'dynamic_graph.Signal', but got "
56+
<< PyCapsule_GetName(objIn);
57+
PyErr_SetString(PyExc_TypeError, oss.str().c_str());
58+
return NULL;
5959
}
6060
pObjOut = PyCapsule_GetPointer(objOut, "dynamic_graph.Signal");
6161
SignalBase<int>* signalOut = (SignalBase<int>*)pObjOut;
6262
if (signalOut == NULL) {
63-
std::ostringstream oss;
64-
oss << "dynamic_graph.plug(a, b): Argument 'a' must be of type 'dynamic_graph.Signal', but got "
65-
<< PyCapsule_GetName(objOut);
66-
PyErr_SetString(PyExc_TypeError, oss.str().c_str());
67-
return NULL;
63+
std::ostringstream oss;
64+
oss << "dynamic_graph.plug(a, b): Argument 'a' must be of type 'dynamic_graph.Signal', but got "
65+
<< PyCapsule_GetName(objOut);
66+
PyErr_SetString(PyExc_TypeError, oss.str().c_str());
67+
return NULL;
6868
}
6969
std::ostringstream os;
7070

@@ -81,7 +81,7 @@ PyObject* enableTrace(
8181
#else
8282
PyObject*, PyObject* args
8383
#endif
84-
) {
84+
) {
8585
PyObject* boolean;
8686
char* filename = NULL;
8787

src/dynamic_graph/entity-py.cc

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ namespace python {
3333
using namespace convert;
3434

3535
#if PY_MAJOR_VERSION == 2
36-
extern PyObject* dgpyError;
37-
# endif
36+
extern PyObject* dgpyError;
37+
#endif
3838

3939
namespace entity {
4040

@@ -47,7 +47,7 @@ PyObject* create(
4747
#else
4848
PyObject*, PyObject* args
4949
#endif
50-
) {
50+
) {
5151
char* className = NULL;
5252
char* instanceName = NULL;
5353

@@ -85,7 +85,7 @@ PyObject* getName(
8585
#else
8686
PyObject*, PyObject* args
8787
#endif
88-
) {
88+
) {
8989
PyObject* object = NULL;
9090
void* pointer = NULL;
9191
std::string name;
@@ -115,7 +115,7 @@ PyObject* getClassName(
115115
#else
116116
PyObject*, PyObject* args
117117
#endif
118-
) {
118+
) {
119119
PyObject* object = NULL;
120120
void* pointer = NULL;
121121
std::string name;
@@ -145,7 +145,7 @@ PyObject* hasSignal(
145145
#else
146146
PyObject*, PyObject* args
147147
#endif
148-
) {
148+
) {
149149
char* name = NULL;
150150
PyObject* object = NULL;
151151
void* pointer = NULL;
@@ -181,7 +181,7 @@ PyObject* getSignal(
181181
#else
182182
PyObject*, PyObject* args
183183
#endif
184-
) {
184+
) {
185185
char* name = NULL;
186186
PyObject* object = NULL;
187187
void* pointer = NULL;
@@ -213,7 +213,7 @@ PyObject* listSignals(
213213
#else
214214
PyObject*, PyObject* args
215215
#endif
216-
) {
216+
) {
217217
void* pointer = NULL;
218218
PyObject* object = NULL;
219219

@@ -246,9 +246,9 @@ PyObject* executeCommand(
246246
#if PY_MAJOR_VERSION >= 3
247247
PyObject* m, PyObject* args
248248
#else
249-
PyObject* , PyObject* args
249+
PyObject*, PyObject* args
250250
#endif
251-
) {
251+
) {
252252
PyObject* object = NULL;
253253
PyObject* argTuple = NULL;
254254
char* commandName = NULL;
@@ -344,7 +344,7 @@ PyObject* getCommandDocstring(
344344
#else
345345
PyObject*, PyObject* args
346346
#endif
347-
) {
347+
) {
348348
PyObject* object = NULL;
349349
char* commandName;
350350
if (!PyArg_ParseTuple(args, "Os", &object, &commandName)) {
@@ -380,7 +380,7 @@ PyObject* getDocString(
380380
#else
381381
PyObject*, PyObject* args
382382
#endif
383-
) {
383+
) {
384384
PyObject* object = NULL;
385385
if (!PyArg_ParseTuple(args, "O", &object)) {
386386
return NULL;
@@ -411,7 +411,7 @@ PyObject* display(
411411
#else
412412
PyObject*, PyObject* args
413413
#endif
414-
) {
414+
) {
415415
/* Retrieve the entity instance. */
416416
PyObject* object = NULL;
417417
if (!PyArg_ParseTuple(args, "O", &object) || (!PyCapsule_CheckExact(object))) {
@@ -438,7 +438,7 @@ PyObject* setLoggerVerbosityLevel(
438438
#else
439439
PyObject*, PyObject* args
440440
#endif
441-
) {
441+
) {
442442
PyObject* object = NULL;
443443
PyObject* objectVerbosityLevel = NULL;
444444
if (!PyArg_ParseTuple(args, "OO", &object, &objectVerbosityLevel)) return NULL;
@@ -500,7 +500,7 @@ PyObject* getLoggerVerbosityLevel(
500500
#else
501501
PyObject*, PyObject* args
502502
#endif
503-
) {
503+
) {
504504
PyObject* object = NULL;
505505
if (!PyArg_ParseTuple(args, "O", &object)) return NULL;
506506

@@ -532,7 +532,7 @@ PyObject* getStreamPrintPeriod(
532532
#else
533533
PyObject*, PyObject* args
534534
#endif
535-
) {
535+
) {
536536
PyObject* object = NULL;
537537
if (!PyArg_ParseTuple(args, "O", &object)) return NULL;
538538

@@ -563,7 +563,7 @@ PyObject* setStreamPrintPeriod(
563563
#else
564564
PyObject*, PyObject* args
565565
#endif
566-
) {
566+
) {
567567
PyObject* object = NULL;
568568
double streamPrintPeriod = 0;
569569
if (!PyArg_ParseTuple(args, "Od", &object, &streamPrintPeriod)) return NULL;
@@ -603,7 +603,7 @@ PyObject* getTimeSample(
603603
#else
604604
PyObject*, PyObject* args
605605
#endif
606-
) {
606+
) {
607607
PyObject* object = NULL;
608608
if (!PyArg_ParseTuple(args, "O", &object)) return NULL;
609609

@@ -634,7 +634,7 @@ PyObject* setTimeSample(
634634
#else
635635
PyObject*, PyObject* args
636636
#endif
637-
) {
637+
) {
638638
PyObject* object = NULL;
639639
double timeSample;
640640
if (!PyArg_ParseTuple(args, "Od", &object, &timeSample)) return NULL;

src/dynamic_graph/pool-py.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ namespace dynamicgraph {
1111
namespace python {
1212

1313
#if PY_MAJOR_VERSION == 2
14-
extern PyObject* dgpyError;
15-
# endif
14+
extern PyObject* dgpyError;
15+
#endif
1616

1717
namespace pool {
1818

@@ -22,7 +22,7 @@ PyObject* writeGraph(
2222
#else
2323
PyObject*, PyObject* args
2424
#endif
25-
) {
25+
) {
2626
char* filename;
2727
if (!PyArg_ParseTuple(args, "s", &filename)) return NULL;
2828
try {
@@ -41,7 +41,7 @@ PyObject* getEntityList(
4141
#else
4242
PyObject*, PyObject* args
4343
#endif
44-
) {
44+
) {
4545
if (!PyArg_ParseTuple(args, "")) return NULL;
4646

4747
std::vector<std::string> entityNames;

0 commit comments

Comments
 (0)