Replace all remaining boost::split() with strings::split() (#2302)

This commit is contained in:
LingBin
2019-11-26 08:22:14 -06:00
committed by ZHAO Chun
parent f716fd2b0b
commit 569d0bb3af
10 changed files with 59 additions and 75 deletions

View File

@ -17,17 +17,14 @@
#include "util/string_util.h"
#include "gutil/strings/split.h"
namespace doris {
std::size_t hash_of_path(const std::string& identifier, const std::string& path) {
std::size_t hash = std::hash<std::string>()(identifier);
std::vector<std::string> path_parts;
boost::split(path_parts, path, boost::is_any_of("/"));
std::vector<std::string> path_parts = strings::Split(path, "/", strings::SkipWhitespace());
for (auto& part : path_parts) {
if (part.empty()) {
continue;
}
boost::hash_combine<std::string>(hash, part);
}
return hash;