Skip to content

Commit f74a936

Browse files
lwolfsonkinagutkin
authored andcommitted
[thrax] Drop unnecessary std::less<> from maps used internally
* These were added a while back in order to let `std::string` STL containers deal with `absl::string_view` keys without copying * Now that we are using Abseil containers, this is dealt with for us PiperOrigin-RevId: 930819014
1 parent 3f459a5 commit f74a936

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

opengrm/thrax/abstract-grm-manager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class AbstractGrmManager {
5050
public:
5151
using Transducer = ::fst::Fst<Arc>;
5252
using MutableTransducer = ::fst::VectorFst<Arc>;
53-
using FstMap = absl::btree_map<std::string, std::unique_ptr<const Transducer>,
54-
std::less<>>;
53+
using FstMap =
54+
absl::btree_map<std::string, std::unique_ptr<const Transducer>>;
5555
using Label = typename Arc::Label;
5656

5757
virtual ~AbstractGrmManager();

opengrm/thrax/walker/evaluator.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,9 @@ class AstEvaluator : public AstWalker {
390390
// grammar). This information gets passed down ultimately to StringFst's
391391
// GetLabelSymbolTable to determine (assuming --save_symbols is set), whether
392392
// or not to add generated labels to the byte and utf8 symbol tables.
393-
void GetFsts(absl::btree_map<std::string, std::unique_ptr<const Transducer>,
394-
std::less<>>* fsts,
395-
bool top_level) {
393+
void GetFsts(
394+
absl::btree_map<std::string, std::unique_ptr<const Transducer>>* fsts,
395+
bool top_level) {
396396
// Checks if we ever used generated labels. If so, get the symbol table and
397397
// add it to a unique FST called kStringFstSymtabFst.
398398
if (auto generated_labels =

0 commit comments

Comments
 (0)