summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-08-31 17:17:24 +0100
committerDan Goodliffe <daniel.goodliffe@pressassociation.com>2015-09-01 16:56:11 +0100
commit5d11a56f298af0157ef12b051d2927186a809859 (patch)
tree804f9fbd9e646c6a0c4443e0bff5dae433127659
parentDon't compile default destructors into everything (diff)
downloadlibadhocutil-5d11a56f298af0157ef12b051d2927186a809859.tar.bz2
libadhocutil-5d11a56f298af0157ef12b051d2927186a809859.tar.xz
libadhocutil-5d11a56f298af0157ef12b051d2927186a809859.zip
Improve misc.h compatibility by having the macro call .str() to maintain std::string return type
-rw-r--r--libadhocutil/buffer.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libadhocutil/buffer.h b/libadhocutil/buffer.h
index 602d010..fa1b815 100644
--- a/libadhocutil/buffer.h
+++ b/libadhocutil/buffer.h
@@ -117,9 +117,9 @@ class DLL_PUBLIC Buffer : public virtual IntrusivePtrBase {
};
// libmisc compat macros
-#define vstringf Buffer().vappendf
-#define stringf Buffer().appendf
-#define stringbf Buffer().appendbf
+#define vstringf(...) Buffer().vappendf(__VA_ARGS__).str()
+#define stringf(...) Buffer().appendf(__VA_ARGS__).str()
+#define stringbf(...) Buffer().appendbf(__VA_ARGS__).str()
#endif