diff --git a/mainwindow.cc b/mainwindow.cc index 1ad65111..d78a9c76 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -4200,8 +4200,7 @@ void MainWindow::focusWordList() void MainWindow::addWordToHistory( const QString & word ) { - QRegularExpressionMatch m = RX::Epwing::refWord.match( word ); - if( m.hasMatch() ) + if(QRegularExpressionMatch m = RX::Epwing::refWord.match( word ); m.hasMatch() ) return; history.addItem( History::Item( 1, word.trimmed() ) ); }