[users] Cleaned error handling a bit

This commit is contained in:
Artem Grinev 2020-11-02 04:01:01 +03:00
parent 8e07bb00f9
commit 4e54a2aefe

View File

@ -288,12 +288,12 @@ guessProductName()
static QString
transliterate( const QString& input )
{
static UErrorCode ue = UErrorCode::U_ZERO_ERROR;
static auto ue = UErrorCode::U_ZERO_ERROR;
static auto transliterator = std::unique_ptr< icu::Transliterator >(
icu::Transliterator::createInstance( "Any-Latin; Latin-ASCII", UTRANS_FORWARD, ue )
);
if(ue!=0){
if( ue != UErrorCode::U_ZERO_ERROR ){
cWarning() << "Can't create transliterator";
//it'll be checked later for non-ASCII characters