Skip to content

Commit

Permalink
make members const
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmuhs committed Jun 17, 2024
1 parent 1ff8a62 commit a4275d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions keyvi/include/keyvi/dictionary/secondary_key_dictionary.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ class SecondaryKeyDictionary final {
* @param loading_strategy optional: Loading strategy to use.
*/
explicit SecondaryKeyDictionary(const std::string& filename,
loading_strategy_types loading_strategy = loading_strategy_types::lazy)
const loading_strategy_types loading_strategy = loading_strategy_types::lazy)
: SecondaryKeyDictionary(std::make_shared<fsa::Automata>(filename, loading_strategy), loading_strategy) {}

explicit SecondaryKeyDictionary(fsa::automata_t f,
loading_strategy_types loading_strategy = loading_strategy_types::lazy)
explicit SecondaryKeyDictionary(const fsa::automata_t& f,
const loading_strategy_types loading_strategy = loading_strategy_types::lazy)
: dictionary_(std::make_shared<Dictionary>(f)) {
std::string properties = dictionary_->GetFsa()->GetDictionaryProperties()->GetSpecializedDictionaryProperties();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class SecondaryKeyDictionaryCompiler final {
* @param secondary_keys a list of secondary keys
* @param params compiler parameters
*/
explicit SecondaryKeyDictionaryCompiler(const std::vector<std::string> secondary_keys,
explicit SecondaryKeyDictionaryCompiler(const std::vector<std::string>& secondary_keys,
const keyvi::util::parameters_t& params = keyvi::util::parameters_t())
: params_(params), dictionary_compiler_(params), secondary_keys_(secondary_keys) {}

Expand Down Expand Up @@ -147,9 +147,9 @@ class SecondaryKeyDictionaryCompiler final {
}

private:
keyvi::util::parameters_t params_;
const keyvi::util::parameters_t params_;
DictionaryCompiler<ValueStoreType> dictionary_compiler_;
std::vector<std::string> secondary_keys_;
const std::vector<std::string> secondary_keys_;
std::map<std::string, std::string> secondary_key_replacements_;
uint64_t current_index_ = 2; // starting from 2, 1 is reserved for empty string
std::vector<char> replacements_buffer_;
Expand Down

0 comments on commit a4275d3

Please sign in to comment.