From 3db710f10160dbed3f3dfa34f3f4072b0c3dfe16 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Fri, 30 Oct 2020 06:00:30 +0100 Subject: [PATCH] Do some minor code cleanups --- vst/NativeHelpers.cpp | 2 +- vst/NativeHelpers.mm | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/vst/NativeHelpers.cpp b/vst/NativeHelpers.cpp index 3e373a63..2015a194 100644 --- a/vst/NativeHelpers.cpp +++ b/vst/NativeHelpers.cpp @@ -29,7 +29,7 @@ const fs::path& getUserDocumentsDirectory() const fs::path& getUserDocumentsDirectory() { static const fs::path directory = []() -> fs::path { - const gchar *path = g_get_user_special_dir(G_USER_DIRECTORY_DOCUMENTS); + const gchar* path = g_get_user_special_dir(G_USER_DIRECTORY_DOCUMENTS); if (!path) throw std::runtime_error("Cannot get the document directory."); return fs::path(path); diff --git a/vst/NativeHelpers.mm b/vst/NativeHelpers.mm index 016ff4d1..8f2bfd3d 100644 --- a/vst/NativeHelpers.mm +++ b/vst/NativeHelpers.mm @@ -11,12 +11,11 @@ #error This source file requires ARC #endif -#if defined(__APPLE__) const fs::path& getUserDocumentsDirectory() { static const fs::path directory = []() -> fs::path { - NSFileManager *fm = [NSFileManager defaultManager]; - NSArray *urls = [fm URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask]; + NSFileManager* fm = [NSFileManager defaultManager]; + NSArray* urls = [fm URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask]; for (NSUInteger i = 0, n = [urls count]; i < n; ++i) { NSURL *url = [urls objectAtIndex:i]; if ([url isFileURL]) @@ -26,4 +25,3 @@ const fs::path& getUserDocumentsDirectory() }(); return directory; } -#endif