Check correctly for failed BUILDING_LIST
Previous additional checks for a value BUILDING_LIST entry used an enum incorrectly, resulting in all BUILDING_LIST entries failing. Now fixed to check bad() / fail() which are bool.
This commit is contained in:
parent
01a190fea8
commit
b279384aef
@ -466,8 +466,8 @@ typedef QuadTreeBuilder<LOD*, SGBuildingBin::BuildingInstance, MakeBuildingLeaf,
|
||||
int b = 0, s = 0, o = 0, f = 0, wt = 0, rt = 0;
|
||||
in >> x >> y >> z >> r >> b;
|
||||
|
||||
if (in.failbit) {
|
||||
SG_LOG(SG_TERRAIN, SG_WARN, "Error parsing build entry in: " << absoluteFileName);
|
||||
if (in.bad() || in.fail()) {
|
||||
SG_LOG(SG_TERRAIN, SG_WARN, "Error parsing build entry in: " << absoluteFileName << " line: \"" << line << "\"");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user