@@ -94,8 +94,8 @@ absl::Status ReadCountMatrix(const std::string& in_counts, int rows,
9494} // namespace
9595
9696absl::Status SimpleBigramCharModel::Read (const ModelStorage &storage) {
97- absl::ReaderMutexLock nl (& normalizer_lock_);
98- absl::ReaderMutexLock cl (& counts_lock_);
97+ absl::ReaderMutexLock nl (normalizer_lock_);
98+ absl::ReaderMutexLock cl (counts_lock_);
9999 const std::string &vocab_file = storage.vocabulary_file ();
100100 const std::string &counts_file = storage.model_file ();
101101 if (!vocab_file.empty ()) {
@@ -161,8 +161,8 @@ int SimpleBigramCharModel::NextState(int state, int utf8_sym) {
161161}
162162
163163bool SimpleBigramCharModel::ExtractLMScores (int state, LMScores* response) {
164- absl::ReaderMutexLock nl (& normalizer_lock_);
165- absl::ReaderMutexLock cl (& counts_lock_);
164+ absl::ReaderMutexLock nl (normalizer_lock_);
165+ absl::ReaderMutexLock cl (counts_lock_);
166166 if (!ValidState (state)) {
167167 // Invalid state, switching to start state, by convention state 0.
168168 state = 0 ;
@@ -184,8 +184,8 @@ double SimpleBigramCharModel::SymLMScore(int state, int utf8_sym) {
184184 int sym_state = NextState (state, utf8_sym);
185185 double prob = 0.0 ;
186186 if (ValidState (state) && ValidState (sym_state)) {
187- absl::ReaderMutexLock nl (& normalizer_lock_);
188- absl::ReaderMutexLock cl (& counts_lock_);
187+ absl::ReaderMutexLock nl (normalizer_lock_);
188+ absl::ReaderMutexLock cl (counts_lock_);
189189 prob = static_cast <double >(bigram_counts_[state][sym_state]) /
190190 utf8_normalizer_[state];
191191 }
@@ -195,8 +195,8 @@ double SimpleBigramCharModel::SymLMScore(int state, int utf8_sym) {
195195bool SimpleBigramCharModel::UpdateLMCounts (int state,
196196 const std::vector<int >& utf8_syms,
197197 int64_t count) {
198- absl::WriterMutexLock nl (& normalizer_lock_);
199- absl::WriterMutexLock cl (& counts_lock_);
198+ absl::WriterMutexLock nl (normalizer_lock_);
199+ absl::WriterMutexLock cl (counts_lock_);
200200 if (count <= 0 ) {
201201 // Returns true, nothing to update.
202202 return true ;
0 commit comments