diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-26 07:29:02 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-26 07:29:02 +0200 |
commit | 9f9d5d4b157f6f992edcb5f8c20056915c7dcd7b (patch) | |
tree | cdfb3cb452dc9ba369ba74763c2a88fe3148d085 | |
parent | 3c33345ffd65de1bb121c0ed5486953c75cd1c78 (diff) |
main: simplify win32 add_program_library_path
-rw-r--r-- | facetracknoir/main.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp index 326b40ec..7ba0a462 100644 --- a/facetracknoir/main.cpp +++ b/facetracknoir/main.cpp @@ -17,18 +17,14 @@ using namespace options; // workaround QTBUG-38598, allow for launching from another directory static void add_program_library_path() { + char* p = _pgmptr; + char path[MAX_PATH+1]; + strcpy(path, p); + char* ptr = strrchr(path, '\\'); + if (ptr) { - char* p = _pgmptr; - { - char path[MAX_PATH+1]; - strcpy(path, p); - char* ptr = strrchr(path, '\\'); - if (ptr) - { - *ptr = '\0'; - QCoreApplication::addLibraryPath(path); - } - } + *ptr = '\0'; + QCoreApplication::addLibraryPath(path); } } #endif |