diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2011-11-12 07:13:35 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2011-11-12 07:13:35 +0400 |
commit | fdcd148cac32bca8993e5e8b10e56f86f5f7e522 (patch) | |
tree | 40511e2cd52a181613842d516be7e664bcecd733 /mert | |
parent | 03abf54d2112ece58981ee8f96c23008b95d6def (diff) |
Replace macros with const char arrays used in XXXArray classes.
Diffstat (limited to 'mert')
-rw-r--r-- | mert/FeatureArray.cpp | 7 | ||||
-rw-r--r-- | mert/FeatureArray.h | 5 | ||||
-rw-r--r-- | mert/ScoreArray.cpp | 7 | ||||
-rw-r--r-- | mert/ScoreArray.h | 5 |
4 files changed, 14 insertions, 10 deletions
diff --git a/mert/FeatureArray.cpp b/mert/FeatureArray.cpp index 21be0d0d5..4267e465e 100644 --- a/mert/FeatureArray.cpp +++ b/mert/FeatureArray.cpp @@ -11,6 +11,13 @@ #include "Util.h" #include "FileStream.h" +namespace { +const char FEATURES_TXT_BEGIN[] = "FEATURES_TXT_BEGIN_0"; +const char FEATURES_TXT_END[] = "FEATURES_TXT_END_0"; +const char FEATURES_BIN_BEGIN[] = "FEATURES_BIN_BEGIN_0"; +const char FEATURES_BIN_END[] = "FEATURES_BIN_END_0"; +} // namespace + FeatureArray::FeatureArray() : idx(""), _sparse_flag(false) {} void FeatureArray::savetxt(std::ofstream& outFile) diff --git a/mert/FeatureArray.h b/mert/FeatureArray.h index 876ef8b52..d3e9c56fb 100644 --- a/mert/FeatureArray.h +++ b/mert/FeatureArray.h @@ -9,11 +9,6 @@ #ifndef FEATURE_ARRAY_H #define FEATURE_ARRAY_H -#define FEATURES_TXT_BEGIN "FEATURES_TXT_BEGIN_0" -#define FEATURES_TXT_END "FEATURES_TXT_END_0" -#define FEATURES_BIN_BEGIN "FEATURES_BIN_BEGIN_0" -#define FEATURES_BIN_END "FEATURES_BIN_END_0" - using namespace std; #include <limits> diff --git a/mert/ScoreArray.cpp b/mert/ScoreArray.cpp index 9e74b6faa..62cd1ff26 100644 --- a/mert/ScoreArray.cpp +++ b/mert/ScoreArray.cpp @@ -11,6 +11,13 @@ #include "Util.h" #include "FileStream.h" +namespace { +const char SCORES_TXT_BEGIN[] = "SCORES_TXT_BEGIN_0"; +const char SCORES_TXT_END[] = "SCORES_TXT_END_0"; +const char SCORES_BIN_BEGIN[] = "SCORES_BIN_BEGIN_0"; +const char SCORES_BIN_END[] = "SCORES_BIN_END_0"; +} // namespace + ScoreArray::ScoreArray() : idx("") {} void ScoreArray::savetxt(std::ofstream& outFile, const std::string& sctype) diff --git a/mert/ScoreArray.h b/mert/ScoreArray.h index ee95ab87a..a25943a19 100644 --- a/mert/ScoreArray.h +++ b/mert/ScoreArray.h @@ -9,11 +9,6 @@ #ifndef SCORE_ARRAY_H #define SCORE_ARRAY_H -#define SCORES_TXT_BEGIN "SCORES_TXT_BEGIN_0" -#define SCORES_TXT_END "SCORES_TXT_END_0" -#define SCORES_BIN_BEGIN "SCORES_BIN_BEGIN_0" -#define SCORES_BIN_END "SCORES_BIN_END_0" - using namespace std; #include <limits> |