From: Guilherme Maciel Ferreira Date: Tue, 1 Feb 2011 08:11:16 +0000 (+0100) Subject: Added a prefix to the enumeration items to avoid possible conflicts X-Git-Tag: v2.6~86^2~15 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=ed72d567683000208ebd2b5171ef201d0c1ad016;p=libi2ncommon Added a prefix to the enumeration items to avoid possible conflicts --- diff --git a/src/stringfunc.cpp b/src/stringfunc.cpp index f0b2585..f9c7d95 100644 --- a/src/stringfunc.cpp +++ b/src/stringfunc.cpp @@ -899,7 +899,7 @@ string nice_unit_format( { int multiple = 0; - if (system == SI) + if (system == US_SI) { multiple = 1000; } diff --git a/src/stringfunc.hxx b/src/stringfunc.hxx index 0423afd..628106e 100644 --- a/src/stringfunc.hxx +++ b/src/stringfunc.hxx @@ -193,13 +193,13 @@ using I2n::to_upper; enum UnitSystem { - SI, // SI decimal, composed by multiples of 1000 (KB, MB, etc.) - IEC // IEC binary, composed by multiples of 1024 (KiB, MiB, etc. ) + US_SI, // SI decimal, composed by multiples of 1000 (KB, MB, etc.) + US_IEC // IEC binary, composed by multiples of 1024 (KiB, MiB, etc. ) }; std::string nice_unit_format( const int64_t input, - const UnitSystem system = SI + const UnitSystem system = US_SI ); bool replace_all(std::string &base, const std::string *ist, const std::string *soll);