From 4236519b84e2bea73b1b7756a20a2df24d3fb070 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Sun, 18 Jun 2017 14:36:06 +0100 Subject: `#location(..)` and `#call_location` --- src/string.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/string.cpp') diff --git a/src/string.cpp b/src/string.cpp index 6b6302ede..f2ba05689 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -25,8 +25,11 @@ struct String { // NOTE(bill): used for printf style arguments #define LIT(x) ((int)(x).len), (x).text #define STR_LIT(c_str) {cast(u8 *)c_str, gb_size_of(c_str)-1} -#define str_lit(c_str) String{cast(u8 *)c_str, gb_size_of(c_str)-1} - +#if defined(GB_COMPILER_MSVC) && _MSC_VER < 1700 + #define str_lit(c_str) make_string(cast(u8 *)c_str, gb_size_of(c_str)-1) +#else + #define str_lit(c_str) String{cast(u8 *)c_str, gb_size_of(c_str)-1} +#endif // NOTE(bill): String16 is only used for Windows due to its file directories struct String16 { -- cgit v1.2.3