Skip to content

Commit 4c4e838

Browse files
authored
refactor: replace boost::ends_with with absl::EndsWith (#4107)
1 parent 1e130d9 commit 4c4e838

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/datacollector/data_collector.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#include <utility>
2323
#include <vector>
2424

25+
#include "absl/strings/match.h"
2526
#include "absl/strings/str_join.h"
26-
#include "boost/algorithm/string/predicate.hpp"
2727
#include "gflags/gflags.h"
2828
#include "google/protobuf/util/message_differencer.h"
2929

@@ -415,7 +415,7 @@ bool DataCollectorImpl::FetchBinlogUnlocked(const std::string& name, const std::
415415
for (auto& p : fs::directory_iterator(binlog_dir)) {
416416
if (fs::is_regular_file(p)) {
417417
auto file_name = p.path().filename().string();
418-
if (!boost::ends_with(file_name, ".log")) {
418+
if (!absl::EndsWith(file_name, ".log")) {
419419
continue;
420420
}
421421
auto src = binlog_path + file_name;

src/tablet/file_sender.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#include <thread> // NOLINT
2020
#include <vector>
2121

22+
#include "absl/strings/match.h"
2223
#include "base/file_util.h"
2324
#include "base/glog_wrapper.h"
24-
#include "boost/algorithm/string/predicate.hpp"
2525
#include "common/timer.h"
2626
#include "gflags/gflags.h"
2727
#include "nameserver/system_table.h"
@@ -124,7 +124,7 @@ int FileSender::SendFile(const std::string& file_name, const std::string& full_p
124124
}
125125

126126
int FileSender::SendFile(const std::string& file_name, const std::string& dir_name, const std::string& full_path) {
127-
if (!boost::ends_with(full_path, file_name)) {
127+
if (!absl::EndsWith(full_path, file_name)) {
128128
PDLOG(WARNING, "invalid file[%s] path[%s]", file_name.c_str(), full_path.c_str());
129129
return -1;
130130
}

0 commit comments

Comments
 (0)