diff --git a/.gitignore b/.gitignore index 8921e3a5..8d3e9b58 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,7 @@ Build/* build/* bin/ Bin/ + +# Visual Studio +/out/build/ +/.vs diff --git a/inkcpp/include/list.h b/inkcpp/include/list.h index 4db814e1..c28d8471 100644 --- a/inkcpp/include/list.h +++ b/inkcpp/include/list.h @@ -96,7 +96,7 @@ class list_interface }; /** access value the iterator is pointing to */ - Flag operator*() const { return Flag{.flag_name = _flag_name, .list_name = _list_name}; }; + Flag operator*() const { return Flag{ _flag_name, _list_name }; }; /** continue iterator to next value */ iterator& operator++() diff --git a/inkcpp/include/traits.h b/inkcpp/include/traits.h index 4902399d..fea68002 100644 --- a/inkcpp/include/traits.h +++ b/inkcpp/include/traits.h @@ -140,21 +140,21 @@ template struct string_handler : string_handler { }; -#define MARK_AS_STRING(TYPE, LEN, SRC) \ - template<> \ - struct is_string : constant { \ - }; \ - template<> \ - struct string_handler { \ - static size_t length(const TYPE& x) { return LEN; } \ - static void src_copy(const TYPE& x, char* output) \ - { \ - [&output](const char* src) { \ - while (*src != '\0') \ - *(output++) = *(src++); \ - *output = 0; \ - }(SRC); \ - } \ +#define MARK_AS_STRING(TYPE, LEN, SRC) \ + template<> \ + struct is_string : constant { \ + }; \ + template<> \ + struct string_handler { \ + static size_t length(const TYPE& x) { return static_cast(LEN); } \ + static void src_copy(const TYPE& x, char* output) \ + { \ + [&output](const char* src) { \ + while (*src != '\0') \ + *(output++) = *(src++); \ + *output = 0; \ + }(SRC); \ + } \ } inline size_t c_str_len(const char* c)