Commit 42cf0315 authored by Vladislav Perepelkin's avatar Vladislav Perepelkin
Browse files

Merge branch 'masych_refactor' into 'master'

minor code style refactoring on df.h file

See merge request luna/lo3!26
parents 148623dc 9ff862dc
......@@ -91,11 +91,11 @@ protected:
// Compatibility members
public:
template<class T>
const T* getData() const
const T * getData() const
{
assert(size_%sizeof(T)==0);
return static_cast<const T*>(get_data());
return static_cast<const T *>(get_data());
}
std::string getName() const;
......@@ -123,11 +123,11 @@ public:
}
template<class T>
T* getData()
T *getData()
{
assert(size_%sizeof(T)==0);
return static_cast<T*>(get_data());
return static_cast<T *>(get_data());
}
template<class T>
......@@ -137,8 +137,8 @@ public:
|| std::is_same<T, std::string>::value) {
*this=val;
} else {
ABORT("Unsupported type in setValue: "
+ std::string(typeid(T).name()))
ABORT("Unsupported type in setValue: "
+std::string(typeid(T).name()))
}
}
......@@ -147,16 +147,16 @@ public:
{
if (std::is_same<T, int>::value) {
if (type_!=TYPE_INT) {
ABORT("not an int: " + to_string());
ABORT("not an int: "+to_string());
}
return *static_cast<const T*>(ptr_);
return *static_cast<const T *>(ptr_);
} else if (std::is_same<T, double>::value) {
if (type_!=TYPE_REAL) {
ABORT("not a real: " + to_string());
ABORT("not a real: "+to_string());
}
return *static_cast<const T*>(ptr_);
return *static_cast<const T *>(ptr_);
} else {
ABORT("getValue<" + std::string(typeid(T).name()) + ">() failed for " + to_string());
ABORT("getValue<"+std::string(typeid(T).name())+">() failed for "+to_string());
}
}
......
Markdown is supported
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