From 43cdb369b4ecdc00b6a1c24fd852b3447564bf9d Mon Sep 17 00:00:00 2001 From: fbraem Date: Fri, 13 Nov 2015 19:01:51 +0100 Subject: [PATCH] Call add so we are sure we call the specialization for std::string --- Redis/include/Poco/Redis/Array.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Redis/include/Poco/Redis/Array.h b/Redis/include/Poco/Redis/Array.h index b1c1548af..67de2bfa0 100644 --- a/Redis/include/Poco/Redis/Array.h +++ b/Redis/include/Poco/Redis/Array.h @@ -49,10 +49,12 @@ public: template Array& operator<<(const T& arg) - /// Adds the argument to the array + /// Adds the argument to the array. + /// Note: a std::string will be added as a BulkString because this + /// is commonly used for representing strings in Redis. If you + /// really need a simple string, use addSimpleString. { - addRedisType(new Type(arg)); - return *this; + return add(arg); } Array& operator<<(const char* s); @@ -65,6 +67,9 @@ public: /// Adds an element to the array. /// Note: the specialization for std::string will add a BulkString! /// If you really need a simple string, call addSimpleString. + /// Note: the specialization for std::string will add the string as + /// a BulkString because this is commonly used for representing strings + /// in Redis. If you really need a simple string, use addSimpleString. { addRedisType(new Type(arg)); return *this;