Minor coding style changes

This commit is contained in:
Alexander Bock
2018-11-07 13:49:33 -05:00
parent 9dfb87e220
commit cba6201b67
12 changed files with 11 additions and 40 deletions

View File

@@ -591,7 +591,7 @@ void RenderablePlanesCloud::renderPlanes(const RenderData&,
_program->setUniform(_uniformCache.galaxyTexture, unit);
int currentTextureIndex = -1;
for (const std::unordered_map<int, PlaneAggregate>::reference pAMapItem : _planesMap)
for (std::unordered_map<int, PlaneAggregate>::reference pAMapItem : _planesMap)
{
// For planes with undefined textures references
if (pAMapItem.first == 30) {

View File

@@ -244,9 +244,6 @@ bool isInside(const PixelRegion& lhs, const PixelRegion& rhs) {
}
IODescription cutIODescription(IODescription& io, Side side, int pos) {
const PixelRegion readPreCut = io.read.region;
const PixelRegion writePreCut = io.write.region;
glm::dvec2 ratio = {
io.write.region.numPixels.x / static_cast<double>(io.read.region.numPixels.x),
io.write.region.numPixels.y / static_cast<double>(io.read.region.numPixels.y)
@@ -368,9 +365,9 @@ RawTile::ReadError postProcessErrorCheck(const RawTile& rawTile, size_t nRasters
RawTileDataReader::RawTileDataReader(std::string filePath,
TileTextureInitData initData,
PerformPreprocessing preprocess)
: _initData(std::move(initData))
: _datasetFilePath(std::move(filePath))
, _initData(std::move(initData))
, _preprocess(preprocess)
, _datasetFilePath(std::move(filePath))
{
initialize();
}

View File

@@ -399,9 +399,9 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary)
FloatProperty(OrenNayarRoughnessInfo, 0.f, 0.f, 1.f)
})
, _debugPropertyOwner({ "Debug" })
, _grid(DefaultSkirtedGridSegments, DefaultSkirtedGridSegments)
, _leftRoot(Chunk(LeftHemisphereIndex))
, _rightRoot(Chunk(RightHemisphereIndex))
, _grid(DefaultSkirtedGridSegments, DefaultSkirtedGridSegments)
{
// Read the radii in to its own dictionary
if (dictionary.hasKeyAndValue<glm::dvec3>(KeyRadii)) {
@@ -1229,7 +1229,6 @@ void RenderableGlobe::recompileShaders() {
// Different layer types can be height layers or color layers for example.
// These are used differently within the shaders.
preprocessingData.layeredTextureInfo;
for (size_t i = 0; i < preprocessingData.layeredTextureInfo.size(); i++) {
// lastLayerIndex must be at least 0 for the shader to compile,

View File

@@ -86,7 +86,7 @@ public:
void update(const UpdateData& data) override;
SurfacePositionHandle calculateSurfacePositionHandle(
const glm::dvec3& targetModelSpace) const;
const glm::dvec3& targetModelSpace) const override;
const Ellipsoid& ellipsoid() const;
const LayerManager& layerManager() const;

View File

@@ -28,8 +28,6 @@
#include <ghoul/misc/assert.h>
namespace {
constexpr const char* _loggerCat = "SkirtedGrid";
size_t numElements(int xSegments, int ySegments) {
return 3 * 2 * xSegments * ySegments;
}
@@ -162,7 +160,7 @@ void SkirtedGrid::initializeGL() {
glBindVertexArray(0);
ghoul_assert(
elementData.size() == _elementSize,
static_cast<int>(elementData.size()) == _elementSize,
"Wrong element size. The correct number is assumed in the render method"
);
}

View File

@@ -40,7 +40,7 @@ TileLoadJob::~TileLoadJob() {
}
void TileLoadJob::execute() {
_rawTile = std::move(_rawTileDataReader.readTileData(_chunkIndex));
_rawTile = _rawTileDataReader.readTileData(_chunkIndex);
_hasTile = true;
}

View File

@@ -131,8 +131,6 @@ namespace bylevelprovider {
namespace temporal {
constexpr const char* KeyBasePath = "BasePath";
constexpr const char* KeyPreCacheStartTime = "PreCacheStartTime";
constexpr const char* KeyPreCacheEndTime = "PreCacheEndTime";
constexpr const char* UrlTimePlaceholder = "${OpenSpaceTimeId}";
constexpr const char* TimeStart = "OpenSpaceTimeStart";
@@ -148,20 +146,6 @@ namespace temporal {
};
} // namespace temporal
Type toType(const layergroupid::TypeID& id) {
using T = layergroupid::TypeID;
switch (id) {
case T::Unknown: throw ghoul::MissingCaseException();
case T::DefaultTileLayer: return Type::DefaultTileProvider;
case T::SingleImageTileLayer: return Type::SingleImageTileProvider;
case T::SizeReferenceTileLayer: return Type::SizeReferenceTileProvider;
case T::TemporalTileLayer: return Type::TemporalTileProvider;
case T::TileIndexTileLayer: return Type::TileIndexTileProvider;
case T::ByIndexTileLayer: return Type::ByIndexTileProvider;
case T::ByLevelTileLayer: return Type::ByLevelTileProvider;
default: throw ghoul::MissingCaseException();
}
}
//
// DefaultTileProvider

View File

@@ -28,10 +28,6 @@
#include <modules/server/servermodule.h>
#include <openspace/openspace.h>
namespace {
constexpr const char* _loggerCat = "VersionTopic";
} // namespace
namespace openspace {
bool VersionTopic::isDone() const {

View File

@@ -360,7 +360,7 @@ void SessionRecording::saveStringToFile(const std::string s) {
_bufferIndex = 0;
unsigned char const *p = reinterpret_cast<unsigned char const*>(&strLen);
memcpy((_keyframeBuffer + _bufferIndex), p, writeSize_bytes);
_bufferIndex += (unsigned int)writeSize_bytes;
_bufferIndex += static_cast<unsigned int>(writeSize_bytes);
saveKeyframeToFileBinary(_keyframeBuffer, _bufferIndex);
_recordFile.write(s.c_str(), s.size());
@@ -1065,7 +1065,6 @@ bool SessionRecording::findNextFutureCameraIndex(double currTime) {
{
_idxTimeline_cameraPtrPrev = _idxTimeline_cameraPtrNext;
return false;
break;
}
if (seekAheadIndex == (_timeline.size() - 1)) {

View File

@@ -226,9 +226,9 @@ std::unique_ptr<SceneGraphNode> SceneGraphNode::createFromDictionary(
SceneGraphNode::SceneGraphNode()
: properties::PropertyOwner({ "" })
, _guiHidden(GuiHiddenInfo)
, _guiPath(GuiPathInfo)
, _guiDisplayName(GuiNameInfo)
, _guiHidden(GuiHiddenInfo)
, _transform {
std::make_unique<StaticTranslation>(),
std::make_unique<StaticRotation>(),

View File

@@ -365,9 +365,7 @@ int unzipFile(lua_State* L) {
deleteSource = ghoul::lua::value<bool>(L, 3, ghoul::lua::PopValue::No);
}
auto onExtractEntry = [](const char *filename, void *arg) {
return 0;
};
auto onExtractEntry = [](const char*, void*) { return 0; };
int arg = 2;
zip_extract(source.c_str(), dest.c_str(), onExtractEntry, &arg);