1
0
forked from 0ad/0ad
0ad/source
Ykkrosh dcf5a2667f CLogger: Use cppformat instead of sys_vswprintf.
sys_vswprintf relies on platform-specific printf implementations, which
vary widely between platforms (in handling of truncation, return values,
use of %s/%S/%hs/%ls for mixing char and wchar_t strings, etc) and are
therefore a pain.

Use cppformat's fmt::sprintf instead, which has very similar syntax to
sprintf but is more C++ish and is portable.

Also, wchar_t is stupid, so use char* strings (which are expected to be
UTF-8) in CLogger. This creates a bit of a pain with changing all
callers to convert to char* strings, but that's their fault for not
using UTF-8 already.

Refs #3011.

This was SVN commit r16182.
2015-01-22 20:30:05 +00:00
..
collada Fix VS2013 build errors, warnings 2013-11-03 12:46:07 +00:00
graphics CLogger: Use cppformat instead of sys_vswprintf. 2015-01-22 20:30:05 +00:00
gui Use correct format specifiers. Patch by bog_dan_ro. 2015-01-13 18:37:50 +00:00
i18n Update tinygettext to upstream commit ca0f3ff640. Refs #2522. 2015-01-21 20:37:37 +00:00
lib CLogger: Use cppformat instead of sys_vswprintf. 2015-01-22 20:30:05 +00:00
lobby Some source string fixes. 2014-11-22 22:21:54 +00:00
maths Improve PickEntitiesAtPoint 2015-01-01 23:05:26 +00:00
mocks More FreeBSD build fixes. 2012-01-30 06:21:11 +00:00
network Fix build warning 2015-01-05 20:05:53 +00:00
pch Sacrifices a goat to the gods of insanity. 2014-04-24 20:05:48 +00:00
ps CLogger: Use cppformat instead of sys_vswprintf. 2015-01-22 20:30:05 +00:00
renderer GLES compatibility for particle shader 2015-01-19 21:44:53 +00:00
scriptinterface CLogger: Use cppformat instead of sys_vswprintf. 2015-01-22 20:30:05 +00:00
simulation2 CLogger: Use cppformat instead of sys_vswprintf. 2015-01-22 20:30:05 +00:00
soundmanager Fix segmentation fault in the sound destructor. Happened when the sound file doesn't exist. Errors are shown by other code. 2014-06-24 11:07:39 +00:00
third_party cppformat: Permit NULL arguments for %s. 2015-01-22 20:27:58 +00:00
tools Fix Atlas compile problems with C++11 and clang. Thanks to trompetin17 for investigating this. 2015-01-18 09:48:41 +00:00
contributors.txt Ticket #2127 - Performance and style improvements in scriptinterface. 2013-09-16 19:10:06 +00:00
main.cpp Fixes some issues when toggling fullscreen mode with SDL2, refs #2041: 2014-09-28 22:10:09 +00:00
test_setup.cpp CLogger: Use cppformat instead of sys_vswprintf. 2015-01-22 20:30:05 +00:00