Commit a8ed5f57 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

cppcheck cstyleCast

parent f822723a
......@@ -263,7 +263,7 @@ public:
using Exception::Exception;
template<typename T>
ExceptionError& operator<<(const T & x) {
*((Exception*) this) <<x;
*static_cast<Exception*>(this) <<x;
return *this;
}
};
......@@ -275,7 +275,7 @@ public:
using Exception::Exception;
template<typename T>
ExceptionDebug& operator<<(const T & x) {
*((Exception*) this) <<x;
*static_cast<Exception*>(this) <<x;
return *this;
}
};
......@@ -287,7 +287,7 @@ public:
using Exception::Exception;
template<typename T>
ExceptionTypeError& operator<<(const T & x) {
*((Exception*) this) <<x;
*static_cast<Exception*>(this) <<x;
return *this;
}
};
......
......@@ -1228,7 +1228,7 @@ class Plumed {
Currently used to (optionally) pass error_code.
*/
static void nothrow_handler(void*ptr,int code,const char*what,const void* opt) {
NothrowHandler* h=(NothrowHandler*) ptr;
NothrowHandler* h=static_cast<NothrowHandler*>(ptr);
h->code=code;
h->exception_buffer[0]='\0';
h->what.clear();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment