Skip to content

Commit 9c96772

Browse files
author
Rik
committed
maint: use constexpr rather than static variable in cset 85bb7cdcfe3f.
* ls-oct-binary.cc (save_binary_data): Change static variable "max_dim_val" to be a constexpr.
1 parent db2bae2 commit 9c96772

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libinterp/corefcn/ls-oct-binary.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ save_binary_data (std::ostream& os, const octave_value& tc,
341341
const std::string& name, const std::string& doc,
342342
bool mark_global, bool save_as_floats)
343343
{
344-
static octave_idx_type max_dim_val = std::numeric_limits<int32_t>::max () - 1;
344+
constexpr octave_idx_type max_dim_val = std::numeric_limits<int32_t>::max () - 1;
345345

346346
dim_vector dv = tc.dims ();
347347
if (dv.ndims () > max_dim_val)

0 commit comments

Comments
 (0)