commit 00cd9ce4a9fcd354424d6b0c151ecab100f9e2d1
Author: Juergen Spitzmueller <[email protected]>
Date:   Sun Sep 15 17:19:51 2013 +0200

    remove unused and error-prone function

diff --git a/src/Format.cpp b/src/Format.cpp
index 1ee6411..ff03ab5 100644
--- a/src/Format.cpp
+++ b/src/Format.cpp
@@ -100,19 +100,6 @@ private:
 };
 
 
-class FormatPrettyNameEqual : public unary_function<Format, bool> {
-public:
-       FormatPrettyNameEqual(string const & prettyname)
-               : prettyname_(prettyname)
-       {}
-       bool operator()(Format const & f) const
-       {
-               return f.prettyname() == prettyname_;
-       }
-private:
-       string prettyname_;
-};
-
 } //namespace anon
 
 bool Format::formatSorter(Format const * lhs, Format const * rhs)
@@ -473,19 +460,6 @@ string Formats::getFormatFromExtension(string const & ext) 
const
 }
 
 
-string Formats::getFormatFromPrettyName(string const & prettyname) const
-{
-       if (!prettyname.empty()) {
-               Formats::const_iterator cit =
-                       find_if(formatlist.begin(), formatlist.end(),
-                               FormatPrettyNameEqual(prettyname));
-               if (cit != formats.end())
-                       return cit->name();
-       }
-       return string();
-}
-
-
 /// Used to store last timestamp of file and whether it is (was) zipped
 struct ZippedInfo {
        bool zipped;
diff --git a/src/Format.h b/src/Format.h
index c4c2a5e..0cb760f 100644
--- a/src/Format.h
+++ b/src/Format.h
@@ -156,8 +156,6 @@ public:
        std::string getFormatFromFile(support::FileName const & filename) const;
        /// Finds a format from a file extension. Returns string() if not found.
        std::string getFormatFromExtension(std::string const & ext) const;
-       /// Finds a format by pretty name. Returns string() if not found.
-       std::string getFormatFromPrettyName(std::string const & prettyname) 
const;
        /** Returns true if the file referenced by \p filename is zipped and
         ** needs to be unzipped for being handled
         ** @note For natively zipped formats, such as dia/odg, this returns 
false.

Reply via email to