Skip to content
Snippets Groups Projects
Commit f95241f9 authored by Roman Tolchenov's avatar Roman Tolchenov
Browse files

I guess that g++ is unhappy about having const string as the template argument...

I guess that g++ is unhappy about having const string as the template argument for vector/set. re #1394
parent f5789c8a
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
#include "MantidKernel/System.h"
#include "MantidKernel/DllExport.h"
#include "MantidKernel/Logger.h"
#include "MantidKernel/InstrumentInfo.h"
......@@ -52,7 +52,7 @@ namespace Kernel
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>.
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport FacilityInfo
class EXPORT_OPT_MANTID_KERNEL FacilityInfo
{
public:
FacilityInfo(const Poco::XML::Element* elem);
......@@ -61,7 +61,7 @@ public:
/// Returns default zero padding for this facility
const int zeroPadding()const{return m_zeroPadding;}
/// Returns a list of file extensions
const std::vector<const std::string> extensions()const{return m_extensions;}
const std::vector<std::string> extensions()const{return m_extensions;}
/// Returns the prefered file extension
const std::string preferedExtension()const{return m_extensions.front();}
/// Returns a list of instruments of this facility
......@@ -76,7 +76,7 @@ private:
const std::string m_name; ///< facility name
int m_zeroPadding; ///< default zero padding for this facility
std::vector<const std::string> m_extensions; ///< file extensions in order of preference
std::vector<std::string> m_extensions; ///< file extensions in order of preference
std::vector<InstrumentInfo> m_instruments; ///< list of istruments of thsi facility
static Logger& g_log; ///< logger
};
......
......@@ -4,7 +4,7 @@
//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
#include "MantidKernel/System.h"
#include "MantidKernel/DllExport.h"
#include "MantidKernel/Logger.h"
#include <set>
......@@ -56,7 +56,7 @@ class FacilityInfo;
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>.
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport InstrumentInfo
class EXPORT_OPT_MANTID_KERNEL InstrumentInfo
{
public:
InstrumentInfo(FacilityInfo* f,const Poco::XML::Element* elem);
......@@ -67,13 +67,13 @@ public:
/// Returns zero padding for this instrument
const int zeroPadding()const{return m_zeroPadding;}
/// Return list of techniques
const std::set<const std::string>& techniques()const{return m_technique;}
const std::set<std::string>& techniques()const{return m_technique;}
private:
const FacilityInfo* m_facility; ///< facility
std::string m_name; ///< instrument name
std::string m_shortName; ///< instrument short name
int m_zeroPadding; ///< default zero padding for this facility
std::set<const std::string> m_technique; ///< list of techniques the instrument can do
std::set<std::string> m_technique; ///< list of techniques the instrument can do
static Logger& g_log; ///< logger
};
......
......@@ -75,7 +75,7 @@ FacilityInfo::FacilityInfo(const Poco::XML::Element* elem)
*/
void FacilityInfo::addExtension(const std::string& ext)
{
std::vector<const std::string>::iterator it = std::find(m_extensions.begin(),m_extensions.end(),ext);
std::vector<std::string>::iterator it = std::find(m_extensions.begin(),m_extensions.end(),ext);
if (it == m_extensions.end())
{
m_extensions.push_back(ext);
......
......@@ -49,7 +49,7 @@ public:
TS_ASSERT_EQUALS(fac->name(),"ISIS");
TS_ASSERT_EQUALS(fac->zeroPadding(),5);
const std::vector<const std::string> exts = fac->extensions();
const std::vector<std::string> exts = fac->extensions();
TS_ASSERT_EQUALS(exts.size(),5);
TS_ASSERT_EQUALS(exts[0],"nxs");
TS_ASSERT_EQUALS(exts[1],"raw");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment