Author: mordante
Date: Thu Mar 17 20:41:16 2011
New Revision: 48927

URL: http://svn.gna.org/viewcvs/wesnoth?rev=48927&view=rev
Log:
Minor code polishing.

Modified:
    trunk/src/text.cpp

Modified: trunk/src/text.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/text.cpp?rev=48927&r1=48926&r2=48927&view=diff
==============================================================================
--- trunk/src/text.cpp (original)
+++ trunk/src/text.cpp Thu Mar 17 20:41:16 2011
@@ -41,11 +41,11 @@
  * Needed to make sure it gets freed properly.
  */
 class titor
-{
-       titor(const titor&);
-       titor& operator=(const titor&);
+       : private boost::noncopyable
+{
 public:
-       titor(PangoLayout* layout_) :
+
+       explicit titor(PangoLayout* layout_) :
                itor_(pango_layout_get_iter(layout_))
        {
        }
@@ -55,6 +55,7 @@
        operator PangoLayoutIter*() { return itor_; }
 
 private:
+
        PangoLayoutIter* itor_;
 };
 
@@ -444,9 +445,8 @@
 
 /** Small helper class to make sure the font object is destroyed properly. */
 class tfont
-{
-       tfont(const tfont&);
-       tfont& operator=(const tfont&);
+       : private boost::noncopyable
+{
 public:
        tfont(const std::string& name, const unsigned size, const unsigned 
style) :
                font_(pango_font_description_new())


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to