Skip to content
Snippets Groups Projects
Commit 82cc7dfb authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Exposing simple static function to the outside. Refs #1466.

parent 82e1b6a8
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,9 @@ namespace Mantid ...@@ -11,6 +11,9 @@ namespace Mantid
{ {
namespace Kernel namespace Kernel
{ {
bool has_ending(const std::string &value, const std::string & ending);
/** FileValidator is a validator that checks that a filepath is valid. /** FileValidator is a validator that checks that a filepath is valid.
@author Matt Clarke, ISIS. @author Matt Clarke, ISIS.
...@@ -44,7 +47,7 @@ public: ...@@ -44,7 +47,7 @@ public:
virtual ~FileValidator(); virtual ~FileValidator();
std::set<std::string> allowedValues() const; std::set<std::string> allowedValues() const;
IValidator<std::string>* clone(); IValidator<std::string>* clone();
private: private:
/// The list of permitted extensions /// The list of permitted extensions
const std::set<std::string> m_extensions; const std::set<std::string> m_extensions;
......
...@@ -102,7 +102,7 @@ std::string FileValidator::checkValidity(const std::string &value) const ...@@ -102,7 +102,7 @@ std::string FileValidator::checkValidity(const std::string &value) const
* @param value The string to check the ending for. * @param value The string to check the ending for.
* @param ending The ending the string should have. * @param ending The ending the string should have.
*/ */
static bool has_ending(const std::string &value, const std::string & ending) bool has_ending(const std::string &value, const std::string & ending)
{ {
if (ending.empty()) // always match against an empty extension if (ending.empty()) // always match against an empty extension
return true; return true;
......
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