commit d2248c5: [Minor] Try to fix build

Vsevolod Stakhov vsevolod at rspamd.com
Sat Dec 3 13:49:03 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-12-03 13:46:21 +0000
URL: https://github.com/rspamd/rspamd/commit/d2248c5834c0e99e8f974dfaf6fcb0186b6fde47 (HEAD -> master)

[Minor] Try to fix build

---
 src/libserver/symcache/symcache_item.cxx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/libserver/symcache/symcache_item.cxx b/src/libserver/symcache/symcache_item.cxx
index cfe8b4c14..258e873ff 100644
--- a/src/libserver/symcache/symcache_item.cxx
+++ b/src/libserver/symcache/symcache_item.cxx
@@ -454,7 +454,7 @@ cache_item::add_augmentation(const symcache &cache, std::string_view augmentatio
 
 				return false;
 			}
-			return augmentations.try_emplace(std::string{augmentation}, known_info.weight).second;
+			return augmentations.try_emplace(augmentation, known_info.weight).second;
 		}
 		else {
 			if (!value.has_value()) {
@@ -465,7 +465,7 @@ cache_item::add_augmentation(const symcache &cache, std::string_view augmentatio
 			}
 
 			if (known_info.value_type == augmentation_value_type::STRING_VALUE) {
-				return augmentations.try_emplace(std::string{augmentation}, std::string{value.value()},
+				return augmentations.try_emplace(augmentation, std::string{value.value()},
 						known_info.weight).second;
 			}
 			else if (known_info.value_type == augmentation_value_type::NUMBER_VALUE) {
@@ -482,7 +482,7 @@ cache_item::add_augmentation(const symcache &cache, std::string_view augmentatio
 					return false;
 				}
 
-				return augmentations.try_emplace(std::string{augmentation}, num,
+				return augmentations.try_emplace(augmentation, num,
 						known_info.weight).second;
 			}
 		}
@@ -490,7 +490,7 @@ cache_item::add_augmentation(const symcache &cache, std::string_view augmentatio
 	else {
 		msg_debug_cache("added unknown augmentation %s for symbol %s",
 				"unknown", augmentation.data(), symbol.data());
-		return augmentations.try_emplace(std::string{augmentation}, 0).second;
+		return augmentations.try_emplace(augmentation, 0).second;
 	}
 
 	// Should not be reached


More information about the Commits mailing list