From afcf3b2b6cfe985642587d36812f82bf781bc100 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Sat, 19 Oct 2019 07:02:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B5=D0=B4=D1=83=D0=BF=D1=80=D0=B5=D0=B6=D0=B4=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/myx/filesystem/paths.cpp | 2 +- src/{ => myx}/filesystem/whereami.cpp | 8 ++++---- src/{ => myx}/filesystem/whereami.hpp | 0 src/myx/qt/translators.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename src/{ => myx}/filesystem/whereami.cpp (98%) rename src/{ => myx}/filesystem/whereami.hpp (100%) diff --git a/src/myx/filesystem/paths.cpp b/src/myx/filesystem/paths.cpp index 91afdf0..de974f9 100644 --- a/src/myx/filesystem/paths.cpp +++ b/src/myx/filesystem/paths.cpp @@ -1,7 +1,7 @@ #include "paths.hpp" #include -#include "whereami++.h" +#include #include #include diff --git a/src/filesystem/whereami.cpp b/src/myx/filesystem/whereami.cpp similarity index 98% rename from src/filesystem/whereami.cpp rename to src/myx/filesystem/whereami.cpp index 5145ae2..1dcebb4 100644 --- a/src/filesystem/whereami.cpp +++ b/src/myx/filesystem/whereami.cpp @@ -10,7 +10,7 @@ namespace { extern "C" { #endif -#include +#include #ifndef WAI_NOINLINE #if defined( _MSC_VER ) @@ -143,10 +143,10 @@ int getModulePath( char* out, int capacity, int* dirname_length ) uint64_t addr = reinterpret_cast< uintptr_t >( WAI_RETURN_ADDRESS() ); if ( ( low <= addr ) && ( addr <= high ) ) { - char* resolved; + char* resolved = nullptr; resolved = realpath( path, buffer ); - if ( !resolved ) + if ( resolved == nullptr ) { break; } @@ -185,7 +185,7 @@ int getModulePath( char* out, int capacity, int* dirname_length ) } } - if ( maps ) + if ( maps != nullptr ) { fclose( maps ); } diff --git a/src/filesystem/whereami.hpp b/src/myx/filesystem/whereami.hpp similarity index 100% rename from src/filesystem/whereami.hpp rename to src/myx/filesystem/whereami.hpp diff --git a/src/myx/qt/translators.cpp b/src/myx/qt/translators.cpp index 4b29c26..668cdb3 100644 --- a/src/myx/qt/translators.cpp +++ b/src/myx/qt/translators.cpp @@ -11,7 +11,7 @@ namespace qt { void append_translators( QTranslatorsList& translators, const QString& appName ) { - auto* translator = new QTranslator( qApp ); + auto translator = new QTranslator( qApp ); if ( translator->load( QLocale(), appName, QStringLiteral( "_" ), QStringLiteral( ":/qm" ) ) )