Slicer: 2145-support-for-installing-extension-from-file 9a76e5b8

Author Committer Branch Timestamp Parent
jcfr jcfr 2145-support-for-installing-extension-from-file 2013-05-29 15:08:49 2145-support-for-installing-extension-from-file 95fbb931
Changeset

BUG: Fix compile error related to "WrapValue" unit methods

Following commit r22055 [1], three new methods have been introduced:

  • WrapValueWithPrefix
  • WrapValueWithSuffix
  • WrapValueWithPrefixAndSuffix

[1] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=22055

This was causing a build error on linux:

In member function ‘std::string vtkMRMLUnitNode::WrapValueWithPrefixAndSuffix(std::string&)’:
../vtkMRMLUnitNode.cxx:183: error: no matching function for call to ‘vtkMRMLUnitNode::WrapValueWithPrefix(std::string)’
../vtkMRMLUnitNode.cxx:159: note: candidates are: std::string vtkMRMLUnitNode::WrapValueWithPrefix(std::string&)

Making the method const correct fixed the problem.

More details about the error are reported here: http://stackoverflow.com/questions/1565600/how-come-a-non-const-reference-cannot-bind-to-a-temporary-object

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22060 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Libs/MRML/Core/vtkMRMLUnitNode.cxx Diff File
mod - Libs/MRML/Core/vtkMRMLUnitNode.h Diff File