by GoToRO · 10y ago · 0 comments
std::string pad;
if (path[path.size() - 1] != '/') {
pad = "/";
}
Else?How would that be consistent with your own classes? "Oh no, you can't just use a 'Tree' object, you need to explicitly set that there are no leaves yet, no branches yet, no squirrels yet, etc… etc…"
Do you .clear() your vectors before you use them?
This sounds like newbies that do: #define TRUE (1 == 1)
Anyway the reason for which it would no pass review is that today you use one compiler, tomorrow you have to use another and then you have to review all these little details again. It's about saving money more than anything and you do that by not relying on compiler behavior.