From 085dbece36e9996f65c6844165f5e9c701fa594e Mon Sep 17 00:00:00 2001 From: syntheticpp Date: Wed, 4 Jan 2006 17:28:08 +0000 Subject: [PATCH] 64bit patch. Thanks to Zak Kipling git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@403 7ec92016-0320-0410-acc4-a06ded1c099a --- include/loki/SafeFormat.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/loki/SafeFormat.h b/include/loki/SafeFormat.h index dda2d2a..ad6f351 100755 --- a/include/loki/SafeFormat.h +++ b/include/loki/SafeFormat.h @@ -12,7 +12,7 @@ //////////////////////////////////////////////////////////////////////////////// // This file contains definitions for SafePrintf. SafeScanf coming soon (the // design is similar). -// See Alexandrescu, Andrei: Type-safe Formatting, C/C++ Users Journal, Jul 2005 +// See Alexandrescu, Andrei: Type-safe Formatting, C/C++ Users Journal, Aug 2005 //////////////////////////////////////////////////////////////////////////////// #ifndef LOKI_SAFEFORMAT_H_ @@ -408,9 +408,9 @@ private: } } - void ParseDecimalUInt(unsigned int& dest) { + void ParseDecimalSizeT(size_t& dest) { if (!std::isdigit(*format_, std::locale())) return; - unsigned int r = 0; + size_t r = 0; do { // TODO: inefficient - rewrite r *= 10; @@ -421,7 +421,7 @@ private: } void ReadWidth() { - ParseDecimalUInt(width_); + ParseDecimalSizeT(width_); } void ReadPrecision() {