Revision: 4307
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4307&view=rev
Author:   ossman_
Date:     2011-03-02 12:44:12 +0000 (Wed, 02 Mar 2011)

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

Modified Paths:
--------------
    trunk/common/rfb/Configuration.cxx
    trunk/common/rfb/Configuration.h

Modified: trunk/common/rfb/Configuration.cxx
===================================================================
--- trunk/common/rfb/Configuration.cxx  2011-03-02 12:26:27 UTC (rev 4306)
+++ trunk/common/rfb/Configuration.cxx  2011-03-02 12:44:12 UTC (rev 4307)
@@ -444,6 +444,10 @@
   return strDup(value);
 }
 
+StringParameter::operator const char *() const {
+  return value;
+}
+
 // -=- BinaryParameter
 
 BinaryParameter::BinaryParameter(const char* name_, const char* desc_,

Modified: trunk/common/rfb/Configuration.h
===================================================================
--- trunk/common/rfb/Configuration.h    2011-03-02 12:26:27 UTC (rev 4306)
+++ trunk/common/rfb/Configuration.h    2011-03-02 12:44:12 UTC (rev 4307)
@@ -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.


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to