mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 15:33:10 +02:00
make readFromFileV2() return bool for file exists
This commit is contained in:
parent
89eefe461d
commit
6a32424fb2
2 changed files with 4 additions and 2 deletions
|
@ -865,7 +865,7 @@ int VoxelTree::encodeTreeBitstreamRecursion(int maxEncodeLevel, int& currentEnco
|
|||
return bytesAtThisLevel;
|
||||
}
|
||||
|
||||
void VoxelTree::readFromFileV2(const char* fileName, bool reset) {
|
||||
bool VoxelTree::readFromFileV2(const char* fileName) {
|
||||
std::ifstream file(fileName, std::ios::in|std::ios::binary|std::ios::ate);
|
||||
if(file.is_open()) {
|
||||
printLog("loading file...\n");
|
||||
|
@ -881,7 +881,9 @@ void VoxelTree::readFromFileV2(const char* fileName, bool reset) {
|
|||
delete[] entireFile;
|
||||
|
||||
file.close();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void VoxelTree::writeToFileV2(const char* fileName) const {
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
|
||||
// these will read/write files that match the wireformat, excluding the 'V' leading
|
||||
void writeToFileV2(const char* filename) const;
|
||||
void readFromFileV2(const char* filename, bool reset);
|
||||
bool readFromFileV2(const char* filename);
|
||||
|
||||
private:
|
||||
int encodeTreeBitstreamRecursion(int maxEncodeLevel, int& currentEncodeLevel,
|
||||
|
|
Loading…
Reference in a new issue