add formated printing of std::strings

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@442 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
syntheticpp 2006-01-06 14:06:26 +00:00
parent 5bf7de95be
commit 4d99cdb205
2 changed files with 5 additions and 0 deletions

View file

@ -22,6 +22,7 @@ SafeFormat:
- speed comparison added (pk) - speed comparison added (pk)
- 64 bit problems fixed (Thanks to Zak Kipling) - 64 bit problems fixed (Thanks to Zak Kipling)
- ported to 64-bit Windows, not tested (pk) - ported to 64-bit Windows, not tested (pk)
- Printf/SPrintfing of std::strings added
SmallObject: SmallObject:
- added functions to check for memory corruption (rs) - added functions to check for memory corruption (rs)

View file

@ -166,6 +166,10 @@ namespace Loki
return StoreCountHelper(pi); return StoreCountHelper(pi);
} }
PrintfState& operator()(const std::string& stdstr) {
return operator()(stdstr.c_str());
}
PrintfState& operator()(const char *const s) { PrintfState& operator()(const char *const s) {
if (result_ == -1) return *this; if (result_ == -1) return *this;
ReadLeaders(); ReadLeaders();