| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -127,7 +127,7 @@ This may return SUCCESS immediately if the sleep time is 0 or will return RUNNIN | |||
| 127 | 127 | ||
| 128 | 128 | A **wrong** way to implement the `SleepNode` would be this one: | |
| 129 | 129 | ||
| 130 | - ```c++ | ||
| 130 | + ```cpp | ||
| 131 | 131 | // This is the synchronous version of the Node. Probably not what we want. | |
| 132 | 132 | class BadSleepNode : public BT::ActionNodeBase | |
| 133 | 133 | { | |
@@ -175,7 +175,7 @@ the `halt()`method is invoked. | |||
| 175 | 175 | For this reason, users are usually discouraged from using `BT::ThreadedAction` as a | |
| 176 | 176 | base class. Let's have a look again at the SleepNode. | |
| 177 | 177 | ||
| 178 | - ```c++ | ||
| 178 | + ```cpp | ||
| 179 | 179 | // This will spawn its own thread. But it still has problems when halted | |
| 180 | 180 | class BadSleepNode : public BT::ThreadedAction | |
| 181 | 181 | { | |
@@ -204,7 +204,7 @@ class BadSleepNode : public BT::ThreadedAction | |||
| 204 | 204 | ||
| 205 | 205 | A correct version would be: | |
| 206 | 206 | ||
| 207 | - ```c++ | ||
| 207 | + ```cpp | ||
| 208 | 208 | // I will create my own thread here, for no good reason | |
| 209 | 209 | class ThreadedSleepNode : public BT::ThreadedAction | |
| 210 | 210 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -127,7 +127,7 @@ This may return SUCCESS immediately if the sleep time is 0 or will return RUNNIN | |||
| 127 | 127 | ||
| 128 | 128 | A **wrong** way to implement the `SleepNode` would be this one: | |
| 129 | 129 | ||
| 130 | - ```c++ | ||
| 130 | + ```cpp | ||
| 131 | 131 | // This is the synchronous version of the Node. Probably not what we want. | |
| 132 | 132 | class BadSleepNode : public BT::ActionNodeBase | |
| 133 | 133 | { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments