From fb12405015496a5c979e8df4ccc3de3305668cfa Mon Sep 17 00:00:00 2001 From: casey langen Date: Mon, 27 Mar 2017 10:30:45 -0700 Subject: [PATCH] Fixed clang 7.3 compile error. --- CHANGELOG.txt | 6 ++++++ CMakeLists.txt | 2 +- src/musikbox/app/layout/BrowseLayout.cpp | 1 - src/musikbox/app/layout/LibraryLayout.cpp | 16 ++++++++++++++-- src/musikbox/app/util/Version.h | 2 +- src/musikbox/musikbox.rc | Bin 5096 -> 5096 bytes 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8339d4a92..b333c0c58 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,9 @@ +0.10.2 + +* fixed clang 7.3 compile error (macOS mavericks should work again) + +-------------------------------------------------------------------------------- + 0.10.1 user-facing: diff --git a/CMakeLists.txt b/CMakeLists.txt index 1734d41f9..f6b177ff2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 3.0) project(musikbox) set (musikbox_VERSION_MAJOR 0) set (musikbox_VERSION_MINOR 10) -set (musikbox_VERSION_PATCH 1) +set (musikbox_VERSION_PATCH 2) set (musikbox_VERSION "${musikbox_VERSION_MAJOR}.${musikbox_VERSION_MINOR}.${musikbox_VERSION_PATCH}") include(ExternalProject) diff --git a/src/musikbox/app/layout/BrowseLayout.cpp b/src/musikbox/app/layout/BrowseLayout.cpp index de7d2ec63..f70c6249c 100755 --- a/src/musikbox/app/layout/BrowseLayout.cpp +++ b/src/musikbox/app/layout/BrowseLayout.cpp @@ -162,7 +162,6 @@ void BrowseLayout::OnVisibilityChanged(bool visible) { LayoutBase::OnVisibilityChanged(visible); if (visible) { - Window::MessageQueue().RegisterForBroadcasts(shared_from_this()); this->categoryList->Requery(); } } diff --git a/src/musikbox/app/layout/LibraryLayout.cpp b/src/musikbox/app/layout/LibraryLayout.cpp index d7683e8c3..16c4be0df 100755 --- a/src/musikbox/app/layout/LibraryLayout.cpp +++ b/src/musikbox/app/layout/LibraryLayout.cpp @@ -199,11 +199,23 @@ void LibraryLayout::UpdateShortcutsWindow() { } void LibraryLayout::OnAddedToParent(IWindow* parent) { - MessageQueue().RegisterForBroadcasts(shared_from_this()); +#if (__clang_major__ == 7 && __clang_minor__ == 3) + std::enable_shared_from_this* receiver = + (std::enable_shared_from_this*) this; +#else + auto receiver = this; +#endif + MessageQueue().RegisterForBroadcasts(receiver->shared_from_this()); } void LibraryLayout::OnRemovedFromParent(IWindow* parent) { - MessageQueue().UnregisterForBroadcasts(shared_from_this()); +#if (__clang_major__ == 7 && __clang_minor__ == 3) + std::enable_shared_from_this* receiver = + (std::enable_shared_from_this*) this; +#else + auto receiver = this; +#endif + MessageQueue().UnregisterForBroadcasts(receiver->shared_from_this()); } void LibraryLayout::OnSearchResultSelected( diff --git a/src/musikbox/app/util/Version.h b/src/musikbox/app/util/Version.h index bb42ca955..c40e49579 100644 --- a/src/musikbox/app/util/Version.h +++ b/src/musikbox/app/util/Version.h @@ -1,3 +1,3 @@ #pragma once -#define VERSION "0.10.1" +#define VERSION "0.10.2" diff --git a/src/musikbox/musikbox.rc b/src/musikbox/musikbox.rc index 7ea5a43054e45cc44500020afb356594ec6c0bfe..afefe5db96aa7cd74dd9bdbda4b51eacb9b174f6 100644 GIT binary patch delta 41 vcmaE%{z84jCN4&!$(y;18I3kS=eo)Sr1tXuWdw@t<&~cNf?sIy3w{;=Q^*g3 delta 41 vcmaE%{z84jCN4(9$(y;184Wi-=eo)Sr1tXuWdw@t<&~cNf?sIy3w{;=Q)>@?