commit | 93c246cf26661bc64aab4f18d11d17ff8b58078a | [log] [tgz] |
---|---|---|
author | Patrick Williams <patrick@stwcx.xyz> | Fri Jun 16 05:04:01 2017 -0500 |
committer | Patrick Williams <patrick@stwcx.xyz> | Fri Jun 16 05:04:01 2017 -0500 |
tree | 2d375676ea5041b3e20fb2a0c3462646b26193c4 | |
parent | 5c48c8b6d06fa7530643731e12bff16b198d5078 [diff] |
sdbus++: increase constness in convert[enum]FromString Change-Id: I884ed42a53e30c9209b45e74f6317ec19bb344b4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/tools/sdbusplus/templates/interface.mako.server.cpp.in b/tools/sdbusplus/templates/interface.mako.server.cpp.in index 165db62..821f42a 100644 --- a/tools/sdbusplus/templates/interface.mako.server.cpp.in +++ b/tools/sdbusplus/templates/interface.mako.server.cpp.in
@@ -190,7 +190,7 @@ } // anonymous namespace -auto ${classname}::convert${e.name}FromString(std::string& s) -> +auto ${classname}::convert${e.name}FromString(const std::string& s) -> ${e.name} { auto i = std::find_if(
diff --git a/tools/sdbusplus/templates/interface.mako.server.hpp b/tools/sdbusplus/templates/interface.mako.server.hpp index c67f9b7..7015ca0 100644 --- a/tools/sdbusplus/templates/interface.mako.server.hpp +++ b/tools/sdbusplus/templates/interface.mako.server.hpp
@@ -105,7 +105,7 @@ * "${interface.name}.<value name>" * @return - The enum value. */ - static ${e.name} convert${e.name}FromString(std::string& s); + static ${e.name} convert${e.name}FromString(const std::string& s); % endfor private: