summaryrefslogtreecommitdiff
path: root/src/common/core.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-06-29 23:23:43 -0700
committerBen Longbons <b.r.longbons@gmail.com>2013-08-01 15:19:45 -0700
commit3b98f3439e33b15bba2036c402f9925340fdb2b9 (patch)
treef6a59330bb747d9cc64f5f83d06e7f76dc01d540 /src/common/core.cpp
parent8d1480c1be7c9741876d89008277a2b3629a4d01 (diff)
downloadtmwa-3b98f3439e33b15bba2036c402f9925340fdb2b9.tar.gz
tmwa-3b98f3439e33b15bba2036c402f9925340fdb2b9.tar.bz2
tmwa-3b98f3439e33b15bba2036c402f9925340fdb2b9.tar.xz
tmwa-3b98f3439e33b15bba2036c402f9925340fdb2b9.zip
Poison std::string and use the various string classes
Diffstat (limited to 'src/common/core.cpp')
-rw-r--r--src/common/core.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/core.cpp b/src/common/core.cpp
index 153414d..76aa09c 100644
--- a/src/common/core.cpp
+++ b/src/common/core.cpp
@@ -76,7 +76,11 @@ int main(int argc, char **argv)
{
do_socket();
- do_init(argc, argv);
+ // ZString args[argc]; is (deliberately!) not supported by clang yet
+ ZString *args = static_cast<ZString *>(alloca(argc * sizeof(ZString)));
+ for (int i = 0; i < argc; ++i)
+ args[i] = ZString(ZString::really_construct_from_a_pointer, argv[i], nullptr);
+ do_init(argc, args);
// set up exit handlers *after* the initialization has happened.
// This is because term_func is likely to depend on successful init.