Skip to content
Snippets Groups Projects
Commit 979e2b9c authored by Andreas Schenk's avatar Andreas Schenk
Browse files

changed size_t to std::size_t to avoid conflict with boost::mpl::size_t

parent 89f27c15
No related branches found
No related tags found
No related merge requests found
...@@ -81,7 +81,7 @@ public: ...@@ -81,7 +81,7 @@ public:
// image state base interface // image state base interface
virtual ImageStateBasePtr Clone(bool cc=true) const; virtual ImageStateBasePtr Clone(bool cc=true) const;
virtual size_t MemSize() const; virtual std::size_t MemSize() const;
virtual DataType GetType() const; virtual DataType GetType() const;
...@@ -168,10 +168,10 @@ public: ...@@ -168,10 +168,10 @@ public:
const T& Value(const Index& i) const; const T& Value(const Index& i) const;
// pass-through to value holder // pass-through to value holder
T& Value(size_t i); T& Value(std::size_t i);
// pass-through to value holder // 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 //! direct access to value holder
ValueHolder<T>& Data(); ValueHolder<T>& Data();
......
...@@ -42,7 +42,7 @@ namespace ost { namespace img { namespace image_state { ...@@ -42,7 +42,7 @@ namespace ost { namespace img { namespace image_state {
namespace { namespace {
template <typename V> template <typename V>
size_t calc_volume(const Size& s) std::size_t calc_volume(const Size& s)
{ {
unsigned int tmp; unsigned int tmp;
unsigned int numbits = 0; unsigned int numbits = 0;
...@@ -67,11 +67,11 @@ size_t calc_volume(const Size& s) ...@@ -67,11 +67,11 @@ size_t calc_volume(const Size& s)
{ {
++numbits; ++numbits;
} }
// check if number of pixels (2**(numbits+1)) larger than what size_t can handle // check if number of pixels (2**(numbits+1)) larger than what std::size_t can handle
if(numbits>=sizeof(size_t)*8){ if(numbits>=sizeof(std::size_t)*8){
throw std::bad_alloc(); 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 } //ns
...@@ -183,7 +183,7 @@ DataType ValueHolder<V>::GetDataType() ...@@ -183,7 +183,7 @@ DataType ValueHolder<V>::GetDataType()
} }
template <typename V> template <typename V>
size_t ValueHolder<V>::MemSize() const std::size_t ValueHolder<V>::MemSize() const
{ {
return sizeof(V)*data_.size(); return sizeof(V)*data_.size();
} }
......
...@@ -95,7 +95,7 @@ public: ...@@ -95,7 +95,7 @@ public:
static DataType GetDataType(); static DataType GetDataType();
size_t MemSize() const; std::size_t MemSize() const;
...@@ -124,11 +124,11 @@ public: ...@@ -124,11 +124,11 @@ public:
private: private:
#ifdef USE_ROW_ORDER #ifdef USE_ROW_ORDER
size_t depth_; std::size_t depth_;
size_t height_depth_; std::size_t height_depth_;
#else #else
size_t height_; std::size_t height_;
size_t width_height_; std::size_t width_height_;
#endif #endif
// actual data storage // actual data storage
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment