Make it easier to read string parameters by providing an implicit conversion
to const char*.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4307 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/Configuration.cxx b/common/rfb/Configuration.cxx
index e9eee1a..8137501 100644
--- a/common/rfb/Configuration.cxx
+++ b/common/rfb/Configuration.cxx
@@ -444,6 +444,10 @@
   return strDup(value);
 }
 
+StringParameter::operator const char *() const {
+  return value;
+}
+
 // -=- BinaryParameter
 
 BinaryParameter::BinaryParameter(const char* name_, const char* desc_,
diff --git a/common/rfb/Configuration.h b/common/rfb/Configuration.h
index 276651d..35e31fc 100644
--- a/common/rfb/Configuration.h
+++ b/common/rfb/Configuration.h
@@ -241,6 +241,7 @@
     virtual char* getDefaultStr() const;
     virtual char* getValueStr() const;
     void setDefaultStr(const char* v);
+    operator const char*() const;
 
     // getData() returns a copy of the data - it must be delete[]d by the
     // caller.