]> git.lyx.org Git - lyx.git/blobdiff - src/ShareContainer.h
Point fix, earlier forgotten
[lyx.git] / src / ShareContainer.h
index b36d1b652f18de260e98da79a26163e9d5051b43..d37dc3580d02c3009faca336fd4c08e3a33ce7ee 100644 (file)
@@ -1,13 +1,23 @@
 // -*- C++ -*-
+/**
+ * \file ShareContainer.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS.
+ */
 
 #ifndef SHARECONTAINER_H
 #define SHARECONTAINER_H
 
+#include <boost/utility.hpp>
+#include <boost/shared_ptr.hpp>
+
 #include <vector>
 #include <algorithm>
 #include <functional>
-#include <boost/utility.hpp>
-#include <boost/smart_ptr.hpp>
 
 /// Share objects between several users.
 /**
@@ -27,9 +37,9 @@ public:
        value_type
        get(Share const & ps) const {
                // First see if we already have this ps in the container
-               Params::iterator it = std::find_if(params.begin(),
-                                                  params.end(),
-                                                  isEqual(ps));
+               typename Params::iterator it = std::find_if(params.begin(),
+                                                           params.end(),
+                                                           isEqual(ps));
                value_type tmp;
                if (it == params.end()) {
                        // ok we don't have it so we should
@@ -66,19 +76,19 @@ private:
                        return p.unique();
                }
        };
-       
+
        /** Remove all unique items.
            This removes all elements from params that is only referenced
            from the private container. This can be considered a memory
            optimizaton.
        */
        void clean() const {
-               Params::iterator it = std::remove_if(params.begin(),
-                                                    params.end(),
-                                                    isUnique());
+               typename Params::iterator it = std::remove_if(params.begin(),
+                                                             params.end(),
+                                                             isUnique());
                params.erase(it, params.end());
        }
-       
+
        /// The actual container.
        mutable Params params;
 };