comparison Applications/Samples/Common/RtViewerView.cpp @ 1573:32e0c007789d

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 21 Sep 2020 18:28:34 +0200
parents 6e0da8370270
children 74ed691f9c64
comparison
equal deleted inserted replaced
1572:1b3039384972 1573:32e0c007789d
72 std::unique_ptr<IViewport::ILock> lock(viewport_->Lock()); 72 std::unique_ptr<IViewport::ILock> lock(viewport_->Lock());
73 ViewportController& controller = lock->GetController(); 73 ViewportController& controller = lock->GetController();
74 Scene2D& scene = controller.GetScene(); 74 Scene2D& scene = controller.GetScene();
75 75
76 // do not try to use stuff too early! 76 // do not try to use stuff too early!
77 OrthancStone::ICompositor& compositor = lock->GetCompositor(); 77 const OrthancStone::ICompositor& compositor = lock->GetCompositor();
78 78
79 std::stringstream msg; 79 std::stringstream msg;
80 80
81 for (std::map<std::string, std::string>::const_iterator kv = infoTextMap_.begin(); 81 for (std::map<std::string, std::string>::const_iterator kv = infoTextMap_.begin();
82 kv != infoTextMap_.end(); ++kv) 82 kv != infoTextMap_.end(); ++kv)
260 Orthanc::EmbeddedResources::GetFileResource(ttf, Orthanc::EmbeddedResources::UBUNTU_FONT); 260 Orthanc::EmbeddedResources::GetFileResource(ttf, Orthanc::EmbeddedResources::UBUNTU_FONT);
261 compositor.SetFont(0, ttf, FONT_SIZE_0, Orthanc::Encoding_Latin1); 261 compositor.SetFont(0, ttf, FONT_SIZE_0, Orthanc::Encoding_Latin1);
262 compositor.SetFont(1, ttf, FONT_SIZE_1, Orthanc::Encoding_Latin1); 262 compositor.SetFont(1, ttf, FONT_SIZE_1, Orthanc::Encoding_Latin1);
263 } 263 }
264 264
265 void RtViewerView::SetInfoDisplayMessage( 265 void RtViewerView::SetInfoDisplayMessage(const std::string& key,
266 std::string key, std::string value) 266 const std::string& value)
267 { 267 {
268 if (value == "") 268 if (value == "")
269 infoTextMap_.erase(key); 269 infoTextMap_.erase(key);
270 else 270 else
271 infoTextMap_[key] = value; 271 infoTextMap_[key] = value;