mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Fixing more includes and forward declarations (#3876)
This commit is contained in:
@@ -25,8 +25,10 @@
|
||||
#include <modules/multiresvolume/rendering/histogrammanager.h>
|
||||
|
||||
#include <modules/multiresvolume/rendering/tsp.h>
|
||||
#include <openspace/util/histogram.h>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <utility>
|
||||
|
||||
namespace openspace {
|
||||
|
||||
@@ -52,7 +54,7 @@ Histogram* HistogramManager::histogram(unsigned int brickIndex) {
|
||||
}
|
||||
|
||||
bool HistogramManager::buildHistogram(TSP* tsp, unsigned int brickIndex) {
|
||||
Histogram histogram(_minBin, _maxBin, _numBins);
|
||||
Histogram histogram = Histogram(_minBin, _maxBin, _numBins);
|
||||
const bool isBstLeaf = tsp->isBstLeaf(brickIndex);
|
||||
const bool isOctreeLeaf = tsp->isOctreeLeaf(brickIndex);
|
||||
|
||||
@@ -122,7 +124,7 @@ std::vector<float> HistogramManager::readValues(TSP* tsp, unsigned int brickInde
|
||||
}
|
||||
|
||||
bool HistogramManager::loadFromFile(const std::filesystem::path& filename) {
|
||||
std::ifstream file(filename, std::ios::in | std::ios::binary);
|
||||
std::ifstream file = std::ifstream(filename, std::ios::in | std::ios::binary);
|
||||
if (!file.is_open()) {
|
||||
return false;
|
||||
}
|
||||
@@ -147,12 +149,11 @@ bool HistogramManager::loadFromFile(const std::filesystem::path& filename) {
|
||||
_histograms[i] = Histogram(_minBin, _maxBin, _numBins, data);
|
||||
}
|
||||
|
||||
file.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool HistogramManager::saveToFile(const std::filesystem::path& filename) {
|
||||
std::ofstream file(filename, std::ios::out | std::ios::binary);
|
||||
std::ofstream file = std::ofstream(filename, std::ios::out | std::ios::binary);
|
||||
if (!file.is_open()) {
|
||||
return false;
|
||||
}
|
||||
@@ -173,7 +174,6 @@ bool HistogramManager::saveToFile(const std::filesystem::path& filename) {
|
||||
|
||||
file.write(reinterpret_cast<char*>(histogramData.data()), sizeof(float) * nFloats);
|
||||
|
||||
file.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user