Remove dynamic exceptions
[anna.git] / source / core / util / Millisecond.cpp
index c24c814..8219c35 100644 (file)
@@ -20,12 +20,12 @@ using namespace anna;
 
 #define implement_operator(op) \
    bool Millisecond::operator op (const Second& other) const \
-      throw ()\
+      \
    {\
       return a_value op (other.a_value * (type_t)1000);\
    }\
    bool Millisecond::operator op (const Microsecond& other) const\
-      throw ()\
+      \
    {\
       return a_value op (other.a_value / 1000);\
    }
@@ -35,14 +35,14 @@ Millisecond::Millisecond(const Second& other) : a_value(other.a_value) { a_value
 Millisecond::Millisecond(const Microsecond& other) : a_value(other.a_value / 1000) {;}
 
 Millisecond& Millisecond::operator= (const Second & other)
-throw() {
+{
   a_value = other.a_value;
   a_value *= (type_t)1000;
   return *this;
 }
 
 Millisecond& Millisecond::operator= (const Microsecond & other)
-throw() {
+{
   a_value = (other.a_value / 1000);
   return *this;
 }
@@ -54,7 +54,7 @@ implement_operator( <)
 
 //static
 Millisecond Millisecond::getTime()
-throw() {
+{
   struct timeval tv;
   gettimeofday(&tv, NULL);
   Millisecond result(Second(tv.tv_sec));
@@ -64,7 +64,7 @@ throw() {
 }
 
 timeval* Millisecond::getTimeVal(timeval& tv) const
-throw() {
+{
   if(a_value < 0)
     return NULL;
 
@@ -74,14 +74,14 @@ throw() {
 }
 
 string Millisecond::asString() const
-throw() {
+{
   string result(functions::asString(a_value));
   return result += " ms";
 }
 
 //static
 Millisecond Millisecond::fromString(const std::string& value)
-throw(RuntimeException) {
+noexcept(false) {
   if(value.find(" ms") == string::npos) {
     string msg("String: ");
     msg += value;