From 7a020167749d7bdb9f37d3897b167ecea545c455 Mon Sep 17 00:00:00 2001 From: Gordon McCann Date: Sun, 19 Jun 2022 21:48:12 -0400 Subject: [PATCH] Bugfix for Ubuntu22.04 in SpectrumManager and warning in SPSInputLayer.h --- SpecProject/src/SPSInputLayer.cpp | 2 +- Specter/src/Specter/Core/SpectrumManager.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SpecProject/src/SPSInputLayer.cpp b/SpecProject/src/SPSInputLayer.cpp index 335e6c9..df38ced 100644 --- a/SpecProject/src/SPSInputLayer.cpp +++ b/SpecProject/src/SPSInputLayer.cpp @@ -65,7 +65,7 @@ namespace Specter { ImGui::Text("-------Current Settings-------"); ImGui::Text("Reaction Equation: "); ImGui::SameLine(); - ImGui::Text(m_rxnEqn.c_str()); + ImGui::Text("%s", m_rxnEqn.c_str()); ImGui::Text("X1 Weight: %f", x1_weight.GetValue()); ImGui::Text("X2 Weight: %f", x2_weight.GetValue()); } diff --git a/Specter/src/Specter/Core/SpectrumManager.cpp b/Specter/src/Specter/Core/SpectrumManager.cpp index cf9ef25..a2cc18f 100644 --- a/Specter/src/Specter/Core/SpectrumManager.cpp +++ b/Specter/src/Specter/Core/SpectrumManager.cpp @@ -259,7 +259,7 @@ namespace Specter { uint64_t scalerVal; for (auto& graph : m_graphMap) { - auto& scalerIter = m_scalerMap.find(graph.second->GetScaler()); + auto scalerIter = m_scalerMap.find(graph.second->GetScaler()); if (scalerIter != m_scalerMap.end()) { scalerVal = *(scalerIter->second); @@ -278,7 +278,7 @@ namespace Specter { void SpectrumManager::ClearGraph(const std::string& name) { std::scoped_lock guard(m_managerMutex); - auto& iter = m_graphMap.find(name); + auto iter = m_graphMap.find(name); if (iter != m_graphMap.end()) iter->second->Clear(); } @@ -286,7 +286,7 @@ namespace Specter { void SpectrumManager::DrawGraph(const std::string& name) { std::scoped_lock guard(m_managerMutex); - auto& iter = m_graphMap.find(name); + auto iter = m_graphMap.find(name); if (iter != m_graphMap.end()) iter->second->Draw(); } @@ -294,7 +294,7 @@ namespace Specter { const GraphArgs& SpectrumManager::GetGraphArgs(const std::string& name) { std::scoped_lock guard(m_managerMutex); - auto& iter = m_graphMap.find(name); + auto iter = m_graphMap.find(name); if (iter != m_graphMap.end()) return iter->second->GetArgs(); return m_nullGraphResult;