]> git.lyx.org Git - lyx.git/blobdiff - src/LayoutFile.h
Prevent accidental usage of wrong copy constructor
[lyx.git] / src / LayoutFile.h
index 31031eae8e6b0221d408d1c2f6a3e622d7347060..e27f58befb2eb1e81d1287394cff1a1b18459bbc 100644 (file)
@@ -20,7 +20,6 @@
 
 #include <boost/noncopyable.hpp>
 
-#include <set>
 #include <string>
 #include <vector>
 
@@ -35,7 +34,7 @@ public:
        ///
        typedef std::string base_type;
        ///
-       LayoutFileIndex(base_type t) { data_ = t; }
+       LayoutFileIndex(base_type const & t) : data_(t) { }
        ///
        operator base_type() const { return data_; }
        ///
@@ -82,7 +81,7 @@ private:
        /// LayoutFileList, which calls the private constructor.
        friend class LayoutFileList;
        /// can't create empty LayoutFile
-       LayoutFile() {};
+       LayoutFile() {}
 };
 
 
@@ -91,8 +90,6 @@ private:
 /// via LayoutFileList::get()
 class LayoutFileList {
 public:
-       ///
-       LayoutFileList() {}
        ///
        ~LayoutFileList();
        /// \return The sole instance of this class.
@@ -129,6 +126,8 @@ public:
        bool load(std::string const & name, std::string const & buf_path);
 
 private:
+       ///
+       LayoutFileList() {}
        ///
        typedef std::map<std::string, LayoutFile *> ClassMap;
        /// noncopyable