make variable constexpr to avoid dead store warning

This commit is contained in:
Arne Morten Kvarving
2023-06-01 09:35:21 +02:00
parent ba4d3271c4
commit 1492182866
2 changed files with 2 additions and 2 deletions

View File

@@ -88,7 +88,7 @@ void Trace::show(const char* format, ...)
va_list argList;
va_start(argList, format);
const int maxFormatLength = 4000;
constexpr int maxFormatLength = 4000;
char temp[maxFormatLength + 1];
#ifdef WIN32

View File

@@ -1719,7 +1719,7 @@ std::vector<double> EclipseGrid::createDVector(const std::array<int,3>& dims, st
void EclipseGrid::save(const std::string& filename, bool formatted, const std::vector<Opm::NNCdata>& nnc, const Opm::UnitSystem& units) const {
Opm::UnitSystem::UnitType unitSystemType = units.getType();
const auto length = ::Opm::UnitSystem::measure::length;
constexpr auto length = ::Opm::UnitSystem::measure::length;
const std::array<int, 3> dims = getNXYZ();