Skip to content

Commit

Permalink
Style nits
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-derevenetz committed Oct 15, 2024
1 parent ec03089 commit a88a996
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/engine/translations.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ namespace Translation
// Sets the language with the given name as the current language if the translation for this language is
// already cached and valid, otherwise does nothing. Returns a pair of two flags, the first of which is
// set to true if the translation for the given language is already present in the cache (even if this
// translation is invalid), and the second is set to true if this translation is both present in the cache
// and valid.
// translation is invalid), and the second is set to true if the current language has been successfully
// set.
std::pair<bool, bool> setLanguage( const std::string_view name );

// Sets the language with the given name as the current language if the translation for this language is
Expand Down
4 changes: 2 additions & 2 deletions src/fheroes2/system/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,8 @@ bool Settings::setGameLanguage( const std::string & language )
}

// First, let's see if the translation for the requested language is already cached
if ( const auto [isCached, isValid] = Translation::setLanguage( language ); isCached ) {
return isValid;
if ( const auto [isCached, isSet] = Translation::setLanguage( language ); isCached ) {
return isSet;
}

const std::string fileName = std::string( _gameLanguage ).append( ".mo" );
Expand Down

0 comments on commit a88a996

Please sign in to comment.