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:
// 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();
......
......@@ -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();
}
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment