mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 11:39:49 -06:00
Code Cleanup (#2191)
* constexpr const -> constexpr * const char* -> std::string_view
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
#include <glm/gtx/std_based_type.hpp>
|
||||
|
||||
namespace {
|
||||
constexpr const char* _loggerCat = "BrickManager";
|
||||
constexpr std::string_view _loggerCat = "BrickManager";
|
||||
} // namespace
|
||||
|
||||
namespace openspace {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <ghoul/fmt.h>
|
||||
|
||||
namespace {
|
||||
constexpr const char* _loggerCat = "LocalErrorHistogramManager";
|
||||
constexpr std::string_view _loggerCat = "LocalErrorHistogramManager";
|
||||
} // namespace
|
||||
|
||||
namespace openspace {
|
||||
|
||||
@@ -33,13 +33,13 @@
|
||||
#include <ghoul/opengl/texture.h>
|
||||
|
||||
namespace {
|
||||
constexpr const char* GlslRaycastPath =
|
||||
constexpr std::string_view GlslRaycastPath =
|
||||
"${MODULES}/multiresvolume/shaders/raycast.glsl";
|
||||
constexpr const char* GlslHelperPath =
|
||||
constexpr std::string_view GlslHelperPath =
|
||||
"${MODULES}/multiresvolume/shaders/helper.glsl";
|
||||
constexpr const char* GlslBoundsVsPath =
|
||||
constexpr std::string_view GlslBoundsVsPath =
|
||||
"${MODULES}/multiresvolume/shaders/boundsVs.glsl";
|
||||
constexpr const char* GlslBoundsFsPath =
|
||||
constexpr std::string_view GlslBoundsFsPath =
|
||||
"${MODULES}/multiresvolume/shaders/boundsFs.glsl";
|
||||
} // namespace
|
||||
|
||||
@@ -174,19 +174,19 @@ void MultiresVolumeRaycaster::postRaycast(const RaycastData&,
|
||||
}
|
||||
|
||||
std::string MultiresVolumeRaycaster::boundsVertexShaderPath() const {
|
||||
return GlslBoundsVsPath;
|
||||
return std::string(GlslBoundsVsPath);
|
||||
}
|
||||
|
||||
std::string MultiresVolumeRaycaster::boundsFragmentShaderPath() const {
|
||||
return GlslBoundsFsPath;
|
||||
return std::string(GlslBoundsFsPath);
|
||||
}
|
||||
|
||||
std::string MultiresVolumeRaycaster::raycasterPath() const {
|
||||
return GlslRaycastPath;
|
||||
return std::string(GlslRaycastPath);
|
||||
}
|
||||
|
||||
std::string MultiresVolumeRaycaster::helperPath() const {
|
||||
return GlslHelperPath; // no helper file
|
||||
return std::string(GlslHelperPath); // no helper file
|
||||
}
|
||||
|
||||
void MultiresVolumeRaycaster::setModelTransform(glm::mat4 transform) {
|
||||
|
||||
@@ -59,14 +59,14 @@
|
||||
#include <iterator>
|
||||
|
||||
namespace {
|
||||
constexpr const char* _loggerCat = "RenderableMultiresVolume";
|
||||
constexpr const char* KeyDataSource = "Source";
|
||||
constexpr const char* KeyErrorHistogramsSource = "ErrorHistogramsSource";
|
||||
constexpr const char* KeyTransferFunction = "TransferFunction";
|
||||
constexpr std::string_view _loggerCat = "RenderableMultiresVolume";
|
||||
constexpr std::string_view KeyDataSource = "Source";
|
||||
constexpr std::string_view KeyErrorHistogramsSource = "ErrorHistogramsSource";
|
||||
constexpr std::string_view KeyTransferFunction = "TransferFunction";
|
||||
|
||||
constexpr const char* KeyBrickSelector = "BrickSelector";
|
||||
constexpr const char* KeyStartTime = "StartTime";
|
||||
constexpr const char* KeyEndTime = "EndTime";
|
||||
constexpr std::string_view KeyBrickSelector = "BrickSelector";
|
||||
constexpr std::string_view KeyStartTime = "StartTime";
|
||||
constexpr std::string_view KeyEndTime = "EndTime";
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo StepSizeCoefficientInfo = {
|
||||
"StepSizeCoefficient",
|
||||
|
||||
@@ -32,14 +32,13 @@
|
||||
#include <algorithm>
|
||||
|
||||
namespace {
|
||||
constexpr const char* _loggerCat = "SimpleTfBrickSelector";
|
||||
constexpr std::string_view _loggerCat = "SimpleTfBrickSelector";
|
||||
|
||||
bool compareSplitPoints(const openspace::BrickSelection& a,
|
||||
const openspace::BrickSelection& b)
|
||||
{
|
||||
return a.splitPoints < b.splitPoints;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace openspace {
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <queue>
|
||||
|
||||
namespace {
|
||||
constexpr const char* _loggerCat = "TSP";
|
||||
constexpr std::string_view _loggerCat = "TSP";
|
||||
} // namespace
|
||||
|
||||
namespace openspace {
|
||||
|
||||
Reference in New Issue
Block a user