diff --git a/src/hotkey/hotkey_item.cpp b/src/hotkey/hotkey_item.cpp index d632a402eb6..d226ae4d7fe 100644 --- a/src/hotkey/hotkey_item.cpp +++ b/src/hotkey/hotkey_item.cpp @@ -462,7 +462,7 @@ void hotkey_item::save(config& item) const if (get_hat() >= 0) item["hat"] = get_hat(); if (get_value() >= 0) item["value"] = get_value(); if (get_keycode() >= 0) item["key"] = SDL_GetKeyName(SDLKey(get_keycode())); - if (get_character() >= 0) item["key"] = unicode_cast(get_character()); // Second template argument because get_character returns a signed int + if (get_character() >= 0) item["key"] = unicode_cast(static_cast(get_character())); if (get_mouse() >= 0) item["mouse"] = get_mouse(); if (get_button() >= 0) item["button"] = get_button(); diff --git a/src/serialization/unicode_cast.hpp b/src/serialization/unicode_cast.hpp index e14aa1b1dab..248ef96d71c 100644 --- a/src/serialization/unicode_cast.hpp +++ b/src/serialization/unicode_cast.hpp @@ -92,13 +92,12 @@ typename ucs4_convert_impl::enableif::type unicode_ input, a single character. @return an instance of TD */ -template -//TD unicode_cast(const TI& onechar) -typename boost::enable_if::type, TD >::type unicode_cast(const TI& onechar) +template +TD unicode_cast(ucs4::char_t onechar) { using namespace ucs4_convert_impl; typedef typename convert_impl::type t_impl_writer; - typedef typename convert_impl::type t_impl_reader; + typedef convert_impl::type t_impl_reader; typedef typename std::back_insert_iterator t_outputitor; TD res;