diff --git a/CMakeLists.txt b/CMakeLists.txt index 47544350088206534522a74be892cb6e93a39517..d2b26c52ef9158c1f62ed5afade2133329e55c2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -398,7 +398,7 @@ else() add_definitions(-DUNIX) # -fdiagnostics-color set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fPIC -msse3 -Wall -Werror=unused-result -Werror=return-type") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -pg") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -mfpmath=sse") set(OS_LIBS "dl") endif() diff --git a/applications/gui2/src/screen.cpp b/applications/gui2/src/screen.cpp index fe7747306860f942bb33fa83512fa4326fa7cf5f..6fbd703b84bcb6784d5de302640fd05b6cdd6e4a 100644 --- a/applications/gui2/src/screen.cpp +++ b/applications/gui2/src/screen.cpp @@ -107,6 +107,7 @@ nanogui::Vector2i Screen::viewSize() { void Screen::showError(const std::string&title, const std::string& msg) { + // FIXME: This isn't thread safe? if (msgerror_) { return; } msgerror_ = new nanogui::MessageDialog (screen(), nanogui::MessageDialog::Type::Warning, title, msg); diff --git a/applications/gui2/src/views/thumbnails.cpp b/applications/gui2/src/views/thumbnails.cpp index a12e7cfd7c103605c367489a971a5313e676d49f..78b1b86f120e86baf3b6392696aab3e9f8a8e0e2 100644 --- a/applications/gui2/src/views/thumbnails.cpp +++ b/applications/gui2/src/views/thumbnails.cpp @@ -133,8 +133,6 @@ Thumbnails::~Thumbnails() { } bool Thumbnails::mouseButtonEvent(const nanogui::Vector2i &p, int button, bool down, int modifiers) { - bool r = View::mouseButtonEvent(p, button, down, modifiers); - if (button == 1) { if (!down) { context_menu_->setPosition(p - mPos); @@ -144,6 +142,8 @@ bool Thumbnails::mouseButtonEvent(const nanogui::Vector2i &p, int button, bool d } else { context_menu_->setVisible(false); } + + bool r = View::mouseButtonEvent(p, button, down, modifiers); return r; } diff --git a/components/common/cpp/include/ftl/exception.hpp b/components/common/cpp/include/ftl/exception.hpp index 43e303d9b803282408bea3096d1503b45597d031..e78fe3854c2ebdd97073ceb85fb531673b568f45 100644 --- a/components/common/cpp/include/ftl/exception.hpp +++ b/components/common/cpp/include/ftl/exception.hpp @@ -65,6 +65,6 @@ class exception : public std::exception } -#define FTL_Error(A) (ftl::exception(ftl::Formatter() << __FILE__ << ":" << __LINE__ << ": " << A)) +#define FTL_Error(A) (ftl::exception(ftl::Formatter() << A << " [" << __FILE__ << ":" << __LINE__ << "]")) #endif // _FTL_EXCEPTION_HPP_ diff --git a/components/net/cpp/src/universe.cpp b/components/net/cpp/src/universe.cpp index 4fdba608f62ea64ef4cd16c547ecaa018034c8f6..5586196021db62eb75b2dcb67cb48c3b6d23909b 100644 --- a/components/net/cpp/src/universe.cpp +++ b/components/net/cpp/src/universe.cpp @@ -260,6 +260,13 @@ void Universe::_cleanupPeers() { auto ix = peer_ids_.find(p->id()); if (ix != peer_ids_.end()) peer_ids_.erase(ix); + for (auto i=peer_by_uri_.begin(); i != peer_by_uri_.end(); ++i) { + if (i->second == p) { + peer_by_uri_.erase(i); + break; + } + } + i = peers_.erase(i); if (p->status() == ftl::net::Peer::kReconnecting) {