From: Leandro Lucarella Date: Sun, 17 Aug 2003 00:57:35 +0000 (+0000) Subject: Added a constructor based on a std::string. X-Git-Tag: svn_import~7 X-Git-Url: https://git.llucax.com/software/bife/bife%20%20.git/commitdiff_plain/76d1a22908e943e494b4513d71f01d43a81fa6a6/software/bife/bife++.git/commitdiff_plain/76d1a22908e943e494b4513d71f01d43a81fa6a6 Added a constructor based on a std::string. --- diff --git a/string.cpp b/string.cpp index 7c76f56..573fc61 100644 --- a/string.cpp +++ b/string.cpp @@ -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; diff --git a/string.h b/string.h index 935369c..d684282 100644 --- 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*);