File tree 1 file changed +5
-7
lines changed
runtime/include/cloe/trigger
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 31
31
#include < cloe/trigger.hpp> // for Action, ActionFactory
32
32
#include < cloe/trigger/helper_macros.hpp> // for _X_FACTORY, _X_CALLBACK
33
33
34
- namespace cloe {
35
- namespace actions {
34
+ namespace cloe ::actions {
36
35
37
36
template <typename T>
38
37
T from_string (const std::string& s);
39
38
40
39
template <>
41
- double from_string<double >(const std::string& s) {
40
+ inline double from_string<double >(const std::string& s) {
42
41
return std::stod (s);
43
42
}
44
43
45
44
template <>
46
- int from_string<int >(const std::string& s) {
45
+ inline int from_string<int >(const std::string& s) {
47
46
return std::stoi (s);
48
47
}
49
48
50
49
template <>
51
- bool from_string<bool >(const std::string& s) {
50
+ inline bool from_string<bool >(const std::string& s) {
52
51
if (s == " true" ) {
53
52
return true ;
54
53
} else if (s == " false" ) {
@@ -108,8 +107,7 @@ class SetVariableActionFactory : public ActionFactory {
108
107
T* data_ptr_;
109
108
};
110
109
111
- } // namespace actions
112
- } // namespace cloe
110
+ } // namespace cloe::actions
113
111
114
112
/* *
115
113
* Macro DEFINE_SET_STATE_ACTION defines an action that has only a single state
You can’t perform that action at this time.
0 commit comments