Programming style improvement: following Cppcheck suggestions.

This commit is contained in:
brunoherbelin
2021-04-04 13:13:06 +02:00
parent b4627a1613
commit f443720319
51 changed files with 269 additions and 271 deletions

View File

@@ -31,11 +31,8 @@ typedef struct prop {
std::string name;
bool is_float;
bool is_list;
prop(std::string n, bool t, bool l = false){
name = n;
is_float = t;
is_list = l;
}
prop(const std::string &n, bool t, bool l = false) :
name(n), is_float(t), is_list(l) { }
} plyProperty;
typedef std::map<std::string, std::vector<plyProperty> > plyElementProperties;
@@ -45,9 +42,9 @@ template <typename T>
T parseValue(std::istream& istream) {
T v;
char space = ' ';
istream >> v;
if (!istream.eof()) {
char space = ' ';
istream >> space >> std::ws;
}