commit aba766f: [Minor] Allow to construct an empty string with a filter

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Sep 30 20:07:05 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-09-30 21:00:31 +0100
URL: https://github.com/rspamd/rspamd/commit/aba766f487640bd96e3d2b5fce59240cf14246fa (HEAD -> master)

[Minor] Allow to construct an empty string with a filter

---
 src/libmime/mime_string.hxx | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/libmime/mime_string.hxx b/src/libmime/mime_string.hxx
index 63522e8a0..259788cd5 100644
--- a/src/libmime/mime_string.hxx
+++ b/src/libmime/mime_string.hxx
@@ -265,6 +265,8 @@ public:
 	/* Ctors */
 	basic_mime_string() noexcept : Allocator() {}
 	explicit basic_mime_string(const Allocator& alloc) noexcept : Allocator(alloc) {}
+	explicit basic_mime_string(filter_type &&filt, const Allocator& alloc = Allocator()) noexcept :
+		Allocator(alloc), filter_func(std::forward<filter_type>(filt)) {}
 
 	basic_mime_string(const CharT* str, std::size_t sz, const Allocator& alloc = Allocator()) noexcept :
 			Allocator(alloc)


More information about the Commits mailing list