call ccprintf() with the appropriate argument types so we don't recuse forever
authorAli Saidi <saidi@eecs.umich.edu>
Tue, 13 Mar 2007 00:16:13 +0000 (20:16 -0400)
committerAli Saidi <saidi@eecs.umich.edu>
Tue, 13 Mar 2007 00:16:13 +0000 (20:16 -0400)
--HG--
extra : convert_revision : 5366be897d1193cf9e93b1fcd0689d19783f73a8

src/base/cprintf.hh

index 7f8e33367ea91906e161cc51b1e76ddcab4076fc..cff73a228c80afd9fee717619b8a89d9bbcb9fc8 100644 (file)
@@ -143,20 +143,20 @@ ccprintf(std::ostream &stream, const std::string &format,
 inline void
 ccprintf(std::ostream &stream, const std::string &format, CPRINTF_DECLARATION)
 {
-    ccprintf(stream, format, VARARGS_ALLARGS);
+    ccprintf(stream, format.c_str(), VARARGS_ALLARGS);
 }
 
 inline void
 cprintf(const std::string &format, CPRINTF_DECLARATION)
 {
-    ccprintf(std::cout, format, VARARGS_ALLARGS);
+    ccprintf(std::cout, format.c_str(), VARARGS_ALLARGS);
 }
 
 inline std::string
 csprintf(const std::string &format, CPRINTF_DECLARATION)
 {
     std::stringstream stream;
-    ccprintf(stream, format, VARARGS_ALLARGS);
+    ccprintf(stream, format.c_str(), VARARGS_ALLARGS);
     return stream.str();
 }