Skip to content

Commit

Permalink
Small code refactoring
Browse files Browse the repository at this point in the history
* Removed an unused declaration.
* Swapped the argument order of DCHECK_EQ

#codehealth

PiperOrigin-RevId: 713512608
  • Loading branch information
hiroyuki-komatsu committed Jan 9, 2025
1 parent 45e6960 commit c4cbd4c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/converter/converter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
namespace mozc {
namespace {

using ::mozc::prediction::PredictorInterface;
using ::mozc::usage_stats::UsageStats;

constexpr size_t kErrorIndex = static_cast<size_t>(-1);
Expand Down Expand Up @@ -240,8 +239,8 @@ bool Converter::StartPrediction(const ConversionRequest &request,
if (ShouldSetKeyForPrediction(key, *segments)) {
SetKey(segments, key);
}
DCHECK_EQ(1, segments->conversion_segments_size());
DCHECK_EQ(key, segments->conversion_segment(0).key());
DCHECK_EQ(segments->conversion_segments_size(), 1);
DCHECK_EQ(segments->conversion_segment(0).key(), key);

if (!predictor_->PredictForRequest(request, segments)) {
// Prediction can fail for keys like "12". Even in such cases, rewriters
Expand Down

0 comments on commit c4cbd4c

Please sign in to comment.