Remove dynamic exceptions
[anna.git] / source / core / util / Second.cpp
index fcf75b1..eecb909 100644 (file)
@@ -21,12 +21,12 @@ using namespace anna;
 
 #define implement_operator(op) \
    bool Second::operator op (const Millisecond& other) const \
-      throw ()\
+      \
    {\
       return a_value op (other.a_value / 1000);\
    }\
    bool Second::operator op (const Microsecond& other) const\
-      throw ()\
+      \
    {\
       return a_value op (other.a_value / 1000000);\
    }
@@ -36,13 +36,13 @@ Second::Second(const Millisecond& other) : a_value(other.a_value / 1000) {;}
 Second::Second(const Microsecond& other) : a_value(other.a_value / 1000000) {;}
 
 Second& Second::operator= (const Millisecond & other)
-throw() {
+{
   a_value = (other.a_value / 1000);
   return *this;
 }
 
 Second& Second::operator= (const Microsecond & other)
-throw() {
+{
   a_value = (other.a_value / 1000000);
   return *this;
 }
@@ -53,13 +53,13 @@ implement_operator( >)
 implement_operator( <)
 
 string Second::asDateTime(const char* format) const
-throw() {
+{
   char aux [DateTimeSizeString];
   return string(asDateTime(aux, format));
 }
 
 const char* Second::asDateTime(char* result, const char* format) const
-throw() {
+{
   struct tm* tt = localtime((time_t*) & a_value);
   char aux [256];
 
@@ -71,7 +71,7 @@ throw() {
 
 //static
 Second Second::getTime()
-throw() {
+{
   struct timeval tv;
   gettimeofday(&tv, NULL);
   return Second(tv.tv_sec);
@@ -79,19 +79,19 @@ throw() {
 
 //static
 Second Second::getLocalTime()
-throw() {
+{
   return Second(time(NULL));
 }
 
 string Second::asString() const
-throw() {
+{
   string result(functions::asString(a_value));
   return result += " sec";
 }
 
 //static
 Second Second::fromString(const std::string& value)
-throw(RuntimeException) {
+noexcept(false) {
   if(value.find(" sec") == string::npos) {
     string msg("String: ");
     msg += value;