From 36084d9177da7fd52abb541bf9fe90e645a28d4f Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Fri, 15 Nov 2024 12:34:01 +0100 Subject: [PATCH] Fix `constexpr char* = "fooo";`. (#3211) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The compiler generates a warning: src/coreneuron/apps/corenrn_parameters.hpp:48:51: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] --- src/coreneuron/apps/corenrn_parameters.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/coreneuron/apps/corenrn_parameters.hpp b/src/coreneuron/apps/corenrn_parameters.hpp index 2bc27ccf81..04cf21bfa5 100644 --- a/src/coreneuron/apps/corenrn_parameters.hpp +++ b/src/coreneuron/apps/corenrn_parameters.hpp @@ -45,7 +45,7 @@ struct corenrn_parameters_data { }; static constexpr int report_buff_size_default = 4; - static constexpr char* default_dat_filename = "files.dat"; + static constexpr char const* default_dat_filename = "files.dat"; unsigned spikebuf = 100'000; /// Internal buffer used on every rank for spikes int prcellgid = -1; /// Gid of cell for prcellstate @@ -84,12 +84,12 @@ struct corenrn_parameters_data { double mindelay = 10.; /// Maximum integration interval (likely reduced by minimum NetCon /// delay). - std::string patternstim; /// Apply patternstim using the specified spike file. - std::string datpath = "."; /// Directory path where .dat files - std::string outpath = "."; /// Directory where spikes will be written - std::string filesdat{}; /// Name of file containing list of gids dat files read in - std::string restorepath; /// Restore simulation from provided checkpoint directory. - std::string reportfilepath; /// Reports configuration file. + std::string patternstim; /// Apply patternstim using the specified spike file. + std::string datpath = "."; /// Directory path where .dat files + std::string outpath = "."; /// Directory where spikes will be written + std::string filesdat{}; /// Name of file containing list of gids dat files read in + std::string restorepath; /// Restore simulation from provided checkpoint directory. + std::string reportfilepath; /// Reports configuration file. std::string checkpointpath; /// Enable checkpoint and specify directory to store related files. std::string writeParametersFilepath; /// Write parameters to this file std::string mpi_lib; /// Name of CoreNEURON MPI library to load dynamically.