Skip to content

Commit

Permalink
Fix -Wwritable-strings in compiler/infra
Browse files Browse the repository at this point in the history
Fix -Wwritable-strings in compiler/infra

Signed-off-by: Dylan Tuttle <[email protected]>
  • Loading branch information
dylanjtuttle committed Nov 21, 2023
1 parent e9e268f commit a4bc22d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions compiler/infra/Statistics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,13 @@ class TR_StatsEvents
public:
enum {NAME_LEN=31};
TR_StatsEvents() {}
TR_StatsEvents(const char *name, char **binNames, int minEventId)
TR_StatsEvents(const char *name, const char **binNames, int minEventId)
{
init(name, binNames, minEventId);
}
// the init method can be used if we want to declare an array of stats
// that are initialized later (in a for loop)
void init(const char *name, char **binNames, int minEventId)
void init(const char *name, const char **binNames, int minEventId)
{
strncpy(_name, name, NAME_LEN);
_name[NAME_LEN] = 0; // just in case name is longer than _name
Expand Down Expand Up @@ -341,12 +341,12 @@ class TR_StatsEvents
}
unsigned samples() const {return _numSamples;}
protected:
char _name[NAME_LEN+1];
int _bins[N];
char** _binNames;
int _minEventId; // value of smallest bin
int _numSamples;
int _numInvalidSamples;
char _name[NAME_LEN+1];
int _bins[N];
const char **_binNames;
int _minEventId; // value of smallest bin
int _numSamples;
int _numInvalidSamples;
};

#endif

0 comments on commit a4bc22d

Please sign in to comment.