Browse Source

fixed throw std errors for cross compiling compatibility

Johannes R 12 years ago
parent
commit
cf53b7407c

+ 2 - 2
core/image/ColorT.tcc

@@ -91,7 +91,7 @@ T ColorT<T>::gray() const
     #ifdef NICE_USELIB_FBASICS
       fthrow(Exception,"invalid channel number");
     #else
-      std::__throw_range_error("invalid channel number");
+      throw std::range_error("invalid channel number");
     #endif
   }
     // convert rgb to gray
@@ -102,7 +102,7 @@ T ColorT<T>::gray() const
     #ifdef NICE_USELIB_FBASICS
       fthrow(Exception,"invalid channel number");
     #else
-      std::__throw_range_error("invalid channel number");
+      throw std::range_error("invalid channel number");
     #endif
   }
 }

+ 1 - 1
core/image/Drawable.h

@@ -65,7 +65,7 @@ public:
       #ifdef NICE_USELIB_FBASICS
         fthrow(Exception,"color has to few channels");
       #else
-        std::__throw_range_error("color has to few channels"); 
+        throw std::range_error("color has to few channels"); 
       #endif
     else
         doDraw(image, color);

+ 3 - 3
core/image/Pixel.tcc

@@ -52,11 +52,11 @@ T Pixel<T>::gray() const
     if(this->size()==1) {
       return  this->constData[0]; 
     } else if(this->size()==0) {
-      this->__throw_range_error("invalid channel number"); 
+      throw std::range_error("invalid channel number"); 
     } else if(this->size()==3) {
-      this->__throw_range_error("not implemented yet"); 
+      throw std::range_error("not implemented yet"); 
     } else {
-      this->__throw_range_error("invalid channel number"); 
+      throw std::range_error("invalid channel number"); 
     }
 }
 

+ 1 - 1
core/vector/CheckedMatrixT.h

@@ -89,7 +89,7 @@ public:
   operator()(const ptrdiff_t i, const ptrdiff_t j) {
     if (i < 0 || static_cast<unsigned int>(i) >= this->rows()
         || j < 0 || static_cast<unsigned int>(j) >= this->cols()) {
-        std::out_of_range("MatrixT () access out of range"); 
+        throw std::out_of_range("MatrixT () access out of range"); 
     }
     return MatrixT<ElementType>::operator()(i, j);
   }

+ 1 - 1
core/vector/CheckedRowMatrixT.h

@@ -70,7 +70,7 @@ public:
   operator()(const ptrdiff_t i, const ptrdiff_t j) {
     if (i < 0 || static_cast<unsigned int>(i) >= this->rows()
         || j < 0 || static_cast<unsigned int>(j) >= this->cols()) {
-        std::out_of_range("RowMatrixT () access out of range"); 
+        throw std::out_of_range("RowMatrixT () access out of range"); 
     }
     return RowMatrixT<ElementType>::operator()(i, j);
   }

+ 1 - 1
core/vector/CheckedVectorT.h

@@ -61,7 +61,7 @@ public:
   inline typename VectorT<ElementType>::reference
   operator[](const ptrdiff_t i) {
     if (i < 0 || static_cast<unsigned int>(i) >= this->size()) {
-		std::out_of_range("VectorT () access out of range"); 
+		throw std::out_of_range("VectorT () access out of range"); 
     }
     return this->data[i];
   }