diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:14:37 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:14:37 +0200 |
commit | 8bf668665b107469086f16cb8ad23e47d479d2b4 (patch) | |
tree | 66a91ef06a8caa7cd6819dcbe1860693d3eda8d5 /shared/loki/SafeFormat.h | |
parent | 3.21 (diff) | |
download | FreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.tar.gz FreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.tar.bz2 FreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.zip |
4.0
Diffstat (limited to 'shared/loki/SafeFormat.h')
-rw-r--r-- | shared/loki/SafeFormat.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/shared/loki/SafeFormat.h b/shared/loki/SafeFormat.h index 2734e972..bd2837f9 100644 --- a/shared/loki/SafeFormat.h +++ b/shared/loki/SafeFormat.h @@ -73,7 +73,7 @@ template <class Char> void write(std::pair<Char*, std::size_t>& s, const Char* from, const Char* to) { assert(from <= to); - if(from + s.second < to) + if (from + s.second < to) throw std::overflow_error(""); // s.first: position one past the final copied element s.first = std::copy(from, to, s.first); @@ -106,9 +106,9 @@ struct PrintfState } #define LOKI_PRINTF_STATE_FORWARD(type) \ - PrintfState& operator()(type par) {\ - return (*this)(static_cast< LOKI_SAFEFORMAT_UNSIGNED_LONG >(par)); \ - } + PrintfState& operator()(type par) {\ + return (*this)(static_cast< LOKI_SAFEFORMAT_UNSIGNED_LONG >(par)); \ + } LOKI_PRINTF_STATE_FORWARD(bool) LOKI_PRINTF_STATE_FORWARD(char) @@ -171,21 +171,21 @@ struct PrintfState PrintfState& operator()(void* n) { if (result_ == -1) return *this; // don't even bother - PrintUsing_snprintf(n,"p"); + PrintUsing_snprintf(n, "p"); return *this; } PrintfState& operator()(double n) { if (result_ == -1) return *this; // don't even bother - PrintUsing_snprintf(n,"eEfgG"); + PrintUsing_snprintf(n, "eEfgG"); return *this; } PrintfState& operator()(long double n) { if (result_ == -1) return *this; // don't even bother - PrintUsing_snprintf(n,"eEfgG"); + PrintUsing_snprintf(n, "eEfgG"); return *this; } |