]> git.llucax.com Git - software/bife/bife++.git/commitdiff
Added a constructor based on a std::string.
authorLeandro Lucarella <llucax@gmail.com>
Sun, 17 Aug 2003 00:57:35 +0000 (00:57 +0000)
committerLeandro Lucarella <llucax@gmail.com>
Sun, 17 Aug 2003 00:57:35 +0000 (00:57 +0000)
string.cpp
string.h

index 7c76f568310e1b90eb2bfab4eee2ebd5d8e83137..573fc61256c1e90702032611e9b54f0fb7552a3f 100644 (file)
@@ -18,6 +18,12 @@ String::String(void) {
 #endif
 }*/
 
+String::String(const string& str): string(str) {
+#ifdef DEBUG
+    cerr << "In String::String('" << str << "')." << endl;
+#endif
+}
+
 String::String(const char* str): string(str) {
 #ifdef DEBUG
     cerr << "In String::String('" << str << "')." << endl;
index 935369c6ecbdf4d13da2825133dc804a7a4d1f2c..d6842821c3a031e4803c9b8ec1038ba1fde77771 100644 (file)
--- a/string.h
+++ b/string.h
@@ -28,7 +28,14 @@ namespace bife {
             /**
              * Constructor.
              *
-             * @param attrs String attributes.
+             * @param str String.
+             */
+            String(const string&);
+
+            /**
+             * Constructor.
+             *
+             * @param str String.
              */
             String(const char*);