diff --git a/source/greeter.cpp b/source/greeter.cpp index 6aa9679..f7c02ce 100644 --- a/source/greeter.cpp +++ b/source/greeter.cpp @@ -1,11 +1,20 @@ #include +#if defined(_WIN32) || defined(WIN32) +// apparently this is required to concat strings +# include +#endif + using namespace greeter; Greeter::Greeter(std::string _name) : name(_name) {} std::string Greeter::greet(LanguageCode lang) const { switch (lang) { +#if defined(_WIN32) || defined(WIN32) + // this silences MSVC as it does not seem to understand strongly-typed enums + default: +#endif case LanguageCode::EN: return "Hello, " + name + "!"; case LanguageCode::DE: @@ -13,10 +22,6 @@ std::string Greeter::greet(LanguageCode lang) const { case LanguageCode::ES: return "¡Hola " + name + "!"; case LanguageCode::FR: -#if defined(_WIN32) || defined(WIN32) - // this silences a warning as MSVC does not seem to understand strongly-typed enums - default: -#endif return "Bonjour " + name + "!"; } }