From 979e2b9c29c0dd0e459bb24381f30000e9adb2fe Mon Sep 17 00:00:00 2001 From: Andreas Schenk <andreas_schenk@hms.harvard.edu> Date: Fri, 1 Feb 2013 14:22:56 -0500 Subject: [PATCH] changed size_t to std::size_t to avoid conflict with boost::mpl::size_t --- modules/img/base/src/image_state/image_state_impl.hh | 6 +++--- modules/img/base/src/image_state/value_holder.cc | 10 +++++----- modules/img/base/src/image_state/value_holder.hh | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/img/base/src/image_state/image_state_impl.hh b/modules/img/base/src/image_state/image_state_impl.hh index d18989aaa..e3a70ae93 100644 --- a/modules/img/base/src/image_state/image_state_impl.hh +++ b/modules/img/base/src/image_state/image_state_impl.hh @@ -81,7 +81,7 @@ public: // image state base interface virtual ImageStateBasePtr Clone(bool cc=true) const; - virtual size_t MemSize() const; + virtual std::size_t MemSize() const; virtual DataType GetType() const; @@ -168,10 +168,10 @@ public: const T& Value(const Index& i) const; // pass-through to value holder - T& Value(size_t i); + T& Value(std::size_t i); // pass-through to value holder - const T& Value(size_t i) const; + const T& Value(std::size_t i) const; //! direct access to value holder ValueHolder<T>& Data(); diff --git a/modules/img/base/src/image_state/value_holder.cc b/modules/img/base/src/image_state/value_holder.cc index aafae4b54..b17acccbc 100644 --- a/modules/img/base/src/image_state/value_holder.cc +++ b/modules/img/base/src/image_state/value_holder.cc @@ -42,7 +42,7 @@ namespace ost { namespace img { namespace image_state { namespace { template <typename V> -size_t calc_volume(const Size& s) +std::size_t calc_volume(const Size& s) { unsigned int tmp; unsigned int numbits = 0; @@ -67,11 +67,11 @@ size_t calc_volume(const Size& s) { ++numbits; } - // check if number of pixels (2**(numbits+1)) larger than what size_t can handle - if(numbits>=sizeof(size_t)*8){ + // check if number of pixels (2**(numbits+1)) larger than what std::size_t can handle + if(numbits>=sizeof(std::size_t)*8){ throw std::bad_alloc(); } - return static_cast<size_t>(s[0])*static_cast<size_t>(s[1])*static_cast<size_t>(s[2]); + return static_cast<std::size_t>(s[0])*static_cast<std::size_t>(s[1])*static_cast<std::size_t>(s[2]); } } //ns @@ -183,7 +183,7 @@ DataType ValueHolder<V>::GetDataType() } template <typename V> -size_t ValueHolder<V>::MemSize() const +std::size_t ValueHolder<V>::MemSize() const { return sizeof(V)*data_.size(); } diff --git a/modules/img/base/src/image_state/value_holder.hh b/modules/img/base/src/image_state/value_holder.hh index 6caa155cc..cb154c2e1 100644 --- a/modules/img/base/src/image_state/value_holder.hh +++ b/modules/img/base/src/image_state/value_holder.hh @@ -95,7 +95,7 @@ public: static DataType GetDataType(); - size_t MemSize() const; + std::size_t MemSize() const; @@ -124,11 +124,11 @@ public: private: #ifdef USE_ROW_ORDER - size_t depth_; - size_t height_depth_; + std::size_t depth_; + std::size_t height_depth_; #else - size_t height_; - size_t width_height_; + std::size_t height_; + std::size_t width_height_; #endif // actual data storage -- GitLab