From fc7a4e19b4fde6aa748dbe26c73cc01744dee1e0 Mon Sep 17 00:00:00 2001 From: Seki Inoue Date: Thu, 1 Dec 2022 14:05:24 +0900 Subject: [PATCH] add method to clear buffer with keeping capacity --- src/influxdb-cpp-rest/influxdb_line.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/influxdb-cpp-rest/influxdb_line.h b/src/influxdb-cpp-rest/influxdb_line.h index d59cee1..41ce9c7 100644 --- a/src/influxdb-cpp-rest/influxdb_line.h +++ b/src/influxdb-cpp-rest/influxdb_line.h @@ -149,6 +149,10 @@ namespace influxdb { return !res.size(); } + inline void clear() { + res.clear(); + } + private: inline void add_comma_if_necessary() { if (!this->empty())