summaryrefslogtreecommitdiffstats
path: root/Source/cmListFileCache.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-08-06 14:07:58 (GMT)
committerBrad King <brad.king@kitware.com>2013-08-08 17:26:27 (GMT)
commit0546484e4b7856c417f30a5b8ff6af6a5a080f0d (patch)
tree3ef8308e1115129bf5777a65a0525b0e81ff58e4 /Source/cmListFileCache.h
parent28685ade7a8f60e8519b6bf8a824e6a01365c181 (diff)
downloadCMake-0546484e4b7856c417f30a5b8ff6af6a5a080f0d.zip
CMake-0546484e4b7856c417f30a5b8ff6af6a5a080f0d.tar.gz
CMake-0546484e4b7856c417f30a5b8ff6af6a5a080f0d.tar.bz2
cmListFileArgument: Generalize 'Quoted' bool to 'Delimeter' enum
Replace the boolean value that indicates whether an argument is unquoted or quoted with a generalized enumeration of possible argument types. For now "Quoted" and "Unquoted" remain the only types.
Diffstat (limited to 'Source/cmListFileCache.h')
-rw-r--r--Source/cmListFileCache.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index fec3d07..7bb3b34 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -25,22 +25,27 @@ class cmMakefile;
struct cmListFileArgument
{
- cmListFileArgument(): Value(), Quoted(false), FilePath(0), Line(0) {}
+ enum Delimiter
+ {
+ Unquoted,
+ Quoted
+ };
+ cmListFileArgument(): Value(), Delim(Unquoted), FilePath(0), Line(0) {}
cmListFileArgument(const cmListFileArgument& r):
- Value(r.Value), Quoted(r.Quoted), FilePath(r.FilePath), Line(r.Line) {}
- cmListFileArgument(const std::string& v, bool q, const char* file,
- long line): Value(v), Quoted(q),
+ Value(r.Value), Delim(r.Delim), FilePath(r.FilePath), Line(r.Line) {}
+ cmListFileArgument(const std::string& v, Delimiter d, const char* file,
+ long line): Value(v), Delim(d),
FilePath(file), Line(line) {}
bool operator == (const cmListFileArgument& r) const
{
- return (this->Value == r.Value) && (this->Quoted == r.Quoted);
+ return (this->Value == r.Value) && (this->Delim == r.Delim);
}
bool operator != (const cmListFileArgument& r) const
{
return !(*this == r);
}
std::string Value;
- bool Quoted;
+ Delimiter Delim;
const char* FilePath;
long Line;
};