mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-20 17:51:19 -05:00
Adapt to Ghoul change (use ghoul::to_string instead of std::to_string)
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user