Skip to content

Commit

Permalink
Address global variables should be const
Browse files Browse the repository at this point in the history
  • Loading branch information
gsjaardema committed Nov 29, 2023
1 parent 4a8584c commit 6b11610
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/seacas/applications/conjoin/CJ_Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <array>
#include <string>

static std::array<std::string, 3> qainfo{
static const std::array<std::string, 3> qainfo{
"conjoin",
"1.4.10",
"2023/08/18",
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/applications/cpup/CP_Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
#pragma once
#include <array>
#include <string>
static std::array<std::string, 3> qainfo{"cpup", "0.95 beta", "2023/04/25"};
static const std::array<std::string, 3> qainfo{"cpup", "0.95 beta", "2023/04/25"};
2 changes: 1 addition & 1 deletion packages/seacas/applications/ejoin/EJ_Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <array>
#include <string>

static std::array<std::string, 3> qainfo{
static const std::array<std::string, 3> qainfo{
"ejoin",
"2023/06/16",
"1.6.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/applications/epu/EP_Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <array>
#include <string>

static std::array<std::string, 3> qainfo{
static const std::array<std::string, 3> qainfo{
"epu -- E Pluribus Unum",
"6.07",
"2023/05/17",
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/applications/exo2mat/exo2mat.C
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace {
mat_t *mat_file = nullptr; /* file for binary .mat output */
bool debug = false;

std::array<std::string, 3> qainfo{"exo2mat", "2021/09/27", "4.08"};
const std::array<std::string, 3> qainfo{"exo2mat", "2021/09/27", "4.08"};

void logger(const char *message)
{
Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/applications/exodiff/ED_Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
// See packages/seacas/LICENSE for details
#pragma once

static std::string version("3.28");
static std::string verdate("2023-11-14");
static const std::string version("3.28");
static const std::string verdate("2023-11-14");
4 changes: 2 additions & 2 deletions packages/seacas/applications/exomatlab/exomatlab.C
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ namespace {
// ========================================================================

namespace {
std::string codename;
std::string version = "1.2";
std::string codename;
const std::string version = "1.2";
} // namespace

int main(int argc, char *argv[])
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/applications/mat2exo/mat2exo.C
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ mat_t *mat_file = nullptr; /* file for binary .mat input */

/**********************************************************************/
namespace {
std::array<std::string, 3> qainfo{"mat2exo", "2021/09/27", "4.06"};
const std::array<std::string, 3> qainfo{"mat2exo", "2021/09/27", "4.06"};
}

/**********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/applications/slice/SL_Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <array>
#include <string>

static std::array<std::string, 3> qainfo{
static const std::array<std::string, 3> qainfo{
"slice",
"2023/09/14",
"2.1.05",
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/applications/zellij/ZE_Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <array>
#include <string>

static std::array<std::string, 3> qainfo{
static const std::array<std::string, 3> qainfo{
"zellij",
"2023/01/11",
"1.5.4",
Expand Down

0 comments on commit 6b11610

Please sign in to comment.