summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2009-02-28 14:12:24 +0100
committerDanny Baumann <dannybaumann@web.de>2009-02-28 14:12:24 +0100
commit2ae100045cf31029d4afa1d7b7f0164035ec3c01 (patch)
treec25ed35e33b2f3f46571cd3a2f0022fcaf76e74f /src
parenteadb8c61712148ff533c1af464303767435c0d3d (diff)
downloadzcomp-2ae100045cf31029d4afa1d7b7f0164035ec3c01.tar.gz
zcomp-2ae100045cf31029d4afa1d7b7f0164035ec3c01.tar.bz2
Avoid warnings about wrong option type.
Not sure whether we really want these warnings in the long term, though...
Diffstat (limited to 'src')
-rw-r--r--src/option.cpp10
-rw-r--r--src/privateoption.h6
2 files changed, 8 insertions, 8 deletions
diff --git a/src/option.cpp b/src/option.cpp
index 784e884..31eaa33 100644
--- a/src/option.cpp
+++ b/src/option.cpp
@@ -38,8 +38,8 @@
CompOption::Vector noOptions (0);
-CompOption::Value::Value () :
- priv (new PrivateValue ())
+CompOption::Value::Value (Type type, Type listType) :
+ priv (new PrivateValue (type, listType))
{
}
@@ -434,12 +434,12 @@ CompOption::Value::operator= (const CompOption::Value &val)
return *this;
}
-PrivateValue::PrivateValue () :
- type (CompOption::TypeBool),
+PrivateValue::PrivateValue (CompOption::Type t, CompOption::Type lt) :
+ type (t),
string (""),
action (),
match (),
- listType (CompOption::TypeBool),
+ listType (lt),
list ()
{
memset (&value, 0, sizeof (ValueUnion));
diff --git a/src/privateoption.h b/src/privateoption.h
index b65614b..39d346f 100644
--- a/src/privateoption.h
+++ b/src/privateoption.h
@@ -1,5 +1,4 @@
-/*
- * Copyright © 2008 Dennis Kasprzyk
+/* * Copyright © 2008 Dennis Kasprzyk
* Copyright © 2007 Novell, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software
@@ -65,7 +64,8 @@ typedef union {
class PrivateValue {
public:
- PrivateValue ();
+ PrivateValue (CompOption::Type type = CompOption::TypeBool,
+ CompOption::Type listType = CompOption::TypeBool);
PrivateValue (const PrivateValue&);
void reset ();