Skip to content

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

Address some warnings.

kishorence64805320b7d
diff --git a/src/raft_server.cpp b/src/raft_server.cpp
index dc1483e9..73bd1a63 100644
--- a/src/raft_server.cpp
+++ b/src/raft_server.cpp
@@ -34,6 +34,7 @@ int ReplicationState::start(const butil::EndPoint & peering_endpoint, const int
node_options.fsm = this;
node_options.node_owns_fsm = false;
node_options.snapshot_interval_s = snapshot_interval_s;
+ node_options.filter_before_copy_remote = false;
std::string prefix = "local://" + raft_dir;
node_options.log_uri = prefix + "/" + log_dir_name;
node_options.raft_meta_uri = prefix + "/" + meta_dir_name;
diff --git a/src/string_utils.cpp b/src/string_utils.cpp
index 302831dd..041f7f07 100644
--- a/src/string_utils.cpp
+++ b/src/string_utils.cpp
@@ -19,6 +19,10 @@ std::string lower_and_no_special_chars(const std::string & str) {
}
void StringUtils::unicode_normalize(std::string & str) const {
+ if(str.empty()) {
+ return ;
+ }
+
std::stringstream out;
for (char *s = &str[0]; *s;) {
@@ -49,7 +53,7 @@ void StringUtils::unicode_normalize(std::string & str) const {
}
}
- str.assign(lower_and_no_special_chars(out.str()));
+ str = lower_and_no_special_chars(out.str());
}
std::string StringUtils::randstring(size_t length) {