Boost logo

Boost-Commit :

From: boost_at_[hidden]
Date: 2008-05-25 20:59:13


Author: matthiasschabel
Date: 2008-05-25 20:59:12 EDT (Sun, 25 May 2008)
New Revision: 45757
URL: http://svn.boost.org/trac/boost/changeset/45757

Log:
change scale methods :

symbol_prefix->symbol
name_prefix->name
Text files modified:
   sandbox/units/boost/units/scale.hpp | 16 ++++++++--------
   sandbox/units/boost/units/scaled_base_unit.hpp | 4 ++--
   2 files changed, 10 insertions(+), 10 deletions(-)

Modified: sandbox/units/boost/units/scale.hpp
==============================================================================
--- sandbox/units/boost/units/scale.hpp (original)
+++ sandbox/units/boost/units/scale.hpp 2008-05-25 20:59:12 EDT (Sun, 25 May 2008)
@@ -48,8 +48,8 @@
     typedef static_rational<0> exponent;
     typedef one value_type;
     static one value() { return(one()); }
- static std::string name_prefix() { return(std::string()); }
- static std::string symbol_prefix() { return(std::string()); }
+ static std::string name() { return(std::string()); }
+ static std::string symbol() { return(std::string()); }
 };
 
 template<long Base>
@@ -57,20 +57,20 @@
 
 #ifndef BOOST_UNITS_DOXYGEN
 
-#define BOOST_UNITS_SCALE_SPECIALIZATION(base_,exponent_,val,name,symbol) \
+#define BOOST_UNITS_SCALE_SPECIALIZATION(base_,exponent_,val,name_,symbol_) \
 template<> \
 struct scale<base_, exponent_ > \
 { \
     static const long base = base_; \
     typedef exponent_ exponent; \
     typedef double value_type; \
- static value_type value() { return(val); } \
- static std::string name_prefix() { return(#name); } \
- static std::string symbol_prefix() { return(#symbol); } \
+ static value_type value() { return(val); } \
+ static std::string name() { return(#name_); } \
+ static std::string symbol() { return(#symbol_); } \
 }
 
-#define BOOST_UNITS_SCALE_DEF(exponent,value,name,symbol) \
- BOOST_UNITS_SCALE_SPECIALIZATION(10,static_rational<exponent>,value, name, symbol)
+#define BOOST_UNITS_SCALE_DEF(exponent,value,name_,symbol_) \
+BOOST_UNITS_SCALE_SPECIALIZATION(10,static_rational<exponent>,value, name_, symbol_)
 
 BOOST_UNITS_SCALE_DEF(-24, 1e-24 ,yocto, y);
 BOOST_UNITS_SCALE_DEF(-21, 1e-21, zepto, z);

Modified: sandbox/units/boost/units/scaled_base_unit.hpp
==============================================================================
--- sandbox/units/boost/units/scaled_base_unit.hpp (original)
+++ sandbox/units/boost/units/scaled_base_unit.hpp 2008-05-25 20:59:12 EDT (Sun, 25 May 2008)
@@ -73,11 +73,11 @@
 
     static std::string symbol()
     {
- return(Scale::symbol_prefix() + S::symbol());
+ return(Scale::symbol() + S::symbol());
     }
     static std::string name()
     {
- return(Scale::name_prefix() + S::name());
+ return(Scale::name() + S::name());
     }
 };
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk