Reduce code bloat

Special case C strings because there is no need to handle size for them. Add support for pre-C++11 compilers to make_type.
This commit is contained in:
Victor Zverovich
2014-09-25 07:10:44 -07:00
parent 163178eee1
commit 75a2ea03a7
3 changed files with 70 additions and 33 deletions
+4
View File
@@ -820,6 +820,10 @@ void fmt::internal::PrintfFormatter<Char>::format(
case Arg::LONG_DOUBLE:
writer.write_double(arg.long_double_value, spec);
break;
case Arg::CSTRING:
arg.string.size = 0;
writer.write_str(arg.string, spec);
break;
case Arg::STRING:
writer.write_str(arg.string, spec);
break;