diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-03-12 13:20:39 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-03-14 11:46:11 +0100 |
commit | b8bbd9de2837c234eb04060d8a9959f3cefc5a42 (patch) | |
tree | d45d381efba37dd5e212b1cb5cd1eb43bdf76485 /crawl-ref/source/dbg-asrt.cc | |
parent | f7e1f1543326712ce469c401864959dc745e358f (diff) | |
download | crawl-ref-b8bbd9de2837c234eb04060d8a9959f3cefc5a42.tar.gz crawl-ref-b8bbd9de2837c234eb04060d8a9959f3cefc5a42.zip |
Simplify handling of version info.
They're static strings, there's no point in having functions just to malloc
and pass them around.
Diffstat (limited to 'crawl-ref/source/dbg-asrt.cc')
-rw-r--r-- | crawl-ref/source/dbg-asrt.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/crawl-ref/source/dbg-asrt.cc b/crawl-ref/source/dbg-asrt.cc index 388e2ae202..191143c611 100644 --- a/crawl-ref/source/dbg-asrt.cc +++ b/crawl-ref/source/dbg-asrt.cc @@ -83,14 +83,10 @@ static string _assert_msg; static void _dump_compilation_info(FILE* file) { - string comp_info = compilation_info(); - if (!comp_info.empty()) - { - fprintf(file, "Compilation info:\n"); - fprintf(file, "<<<<<<<<<<<\n"); - fprintf(file, "%s", comp_info.c_str()); - fprintf(file, ">>>>>>>>>>>\n\n"); - } + fprintf(file, "Compilation info:\n"); + fprintf(file, "<<<<<<<<<<<\n"); + fprintf(file, "%s", compilation_info); + fprintf(file, ">>>>>>>>>>>\n\n"); } static void _dump_level_info(FILE* file) @@ -519,7 +515,7 @@ static void _debug_dump_lua_persist(FILE* file) static void _dump_ver_stuff(FILE* file) { - fprintf(file, "Version: %s %s\n", CRAWL, Version::Long().c_str()); + fprintf(file, "Version: %s %s\n", CRAWL, Version::Long); #if defined(UNIX) fprintf(file, "Platform: unix"); # if defined(TARGET_OS_MACOSX) |