aboutsummaryrefslogtreecommitdiff
path: root/src/string.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-06-18 14:36:06 +0100
committerGinger Bill <bill@gingerbill.org>2017-06-18 14:36:06 +0100
commit4236519b84e2bea73b1b7756a20a2df24d3fb070 (patch)
tree39e90d5650a9e84270d41b899eadc3aaed02a87c /src/string.cpp
parente4944b4f2ebf617d629184257ef81e9c3f212e6c (diff)
`#location(..)` and `#call_location`
Diffstat (limited to 'src/string.cpp')
-rw-r--r--src/string.cpp7
1 files changed, 5 insertions, 2 deletions
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 {