Adapt to Ghoul change (use ghoul::to_string instead of std::to_string)

This commit is contained in:
Alexander Bock
2018-07-20 13:56:15 -04:00
parent edc75c562c
commit 74fd38c260
17 changed files with 100 additions and 94 deletions
+4 -6
View File
@@ -26,6 +26,7 @@
#include <ghoul/glm.h>
#include <ghoul/misc/invariants.h>
#include <ghoul/misc/stringconversion.h>
#include <algorithm>
#include <map>
#include <numeric>
@@ -68,9 +69,10 @@ bool JoystickInputStates::button(int button, JoystickAction action) const {
} // namespace openspace::interaction
namespace std {
namespace ghoul {
std::string to_string(openspace::interaction::JoystickAction action) {
template <>
std::string to_string(const openspace::interaction::JoystickAction& action) {
switch (action) {
case openspace::interaction::JoystickAction::Idle: return "Idle";
case openspace::interaction::JoystickAction::Press: return "Press";
@@ -80,10 +82,6 @@ std::string to_string(openspace::interaction::JoystickAction action) {
}
}
} // namespace std
namespace ghoul {
template <>
openspace::interaction::JoystickAction from_string(const std::string& string) {
static const std::map<std::string, openspace::interaction::JoystickAction> Map = {