From 21ee26fe454ade6f7f0a2c796ceb02fd892f2ec7 Mon Sep 17 00:00:00 2001 From: thurston Date: Sat, 5 Jan 2008 01:13:20 +0000 Subject: [PATCH] Made paramSpec in ParamCheck a const char*. git-svn-id: http://svn.complang.org/ragel/trunk@372 052ea7fc-9027-0410-9066-f65837a77df0 --- common/common.cpp | 4 ++-- common/pcheck.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/common.cpp b/common/common.cpp index af7743d..afc8e03 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -110,7 +110,7 @@ HostType *findAlphTypeInternal( char *s1 ) } /* Construct a new parameter checker with for paramSpec. */ -ParamCheck::ParamCheck(char *paramSpec, int argc, char **argv) +ParamCheck::ParamCheck( const char *paramSpec, int argc, char **argv ) : state(noparam), argOffset(0), @@ -166,7 +166,7 @@ bool ParamCheck::check() char argChar = *argOffset; /* Loop over all the parms and look for a match. */ - char *pSpec = paramSpec; + const char *pSpec = paramSpec; while ( *pSpec != 0 ) { char pSpecChar = *pSpec; diff --git a/common/pcheck.h b/common/pcheck.h index 0b836a5..7d36a83 100644 --- a/common/pcheck.h +++ b/common/pcheck.h @@ -25,7 +25,7 @@ class ParamCheck { public: - ParamCheck(char *paramSpec, int argc, char **argv); + ParamCheck( const char *paramSpec, int argc, char **argv); bool check(); @@ -40,7 +40,7 @@ public: int iCurArg; /* Index to the current arg. */ private: - char *paramSpec; /* Parameter spec supplied by the coder. */ + const char *paramSpec; /* Parameter spec supplied by the coder. */ int argc; /* Arguement data from the command line. */ char **argv; -- 2.7.4