[Scummvm-cvs-logs] SF.net SVN: scummvm:[34881] scummvm/trunk/gui

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Nov 3 17:38:47 CET 2008


Revision: 34881
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34881&view=rev
Author:   fingolfin
Date:     2008-11-03 16:38:47 +0000 (Mon, 03 Nov 2008)

Log Message:
-----------
Renamed ThemeLayout::buildCopy to buildCopy::makeClone

Modified Paths:
--------------
    scummvm/trunk/gui/ThemeLayout.cpp
    scummvm/trunk/gui/ThemeLayout.h

Modified: scummvm/trunk/gui/ThemeLayout.cpp
===================================================================
--- scummvm/trunk/gui/ThemeLayout.cpp	2008-11-03 16:00:52 UTC (rev 34880)
+++ scummvm/trunk/gui/ThemeLayout.cpp	2008-11-03 16:38:47 UTC (rev 34881)
@@ -45,9 +45,9 @@
 	
 	if (getLayoutType() == layout->getLayoutType()) {
 		for (uint i = 0; i < layout->_children.size(); ++i)
-			_children.push_back(layout->_children[i]->buildCopy()); 
+			_children.push_back(layout->_children[i]->makeClone()); 
 	} else {
-		_children.push_back(layout->buildCopy()); 
+		_children.push_back(layout->makeClone()); 
 	}
 }
 
@@ -152,8 +152,7 @@
 		
 		if (_centered && _children[i]->getWidth() < _w && _w != -1) {
 			_children[i]->setX((_w >> 1) - (_children[i]->getWidth() >> 1));
-		}
-		else
+		} else
 			_children[i]->setX(curX);
 
 		curY += _children[i]->getHeight() + _spacing;	

Modified: scummvm/trunk/gui/ThemeLayout.h
===================================================================
--- scummvm/trunk/gui/ThemeLayout.h	2008-11-03 16:00:52 UTC (rev 34880)
+++ scummvm/trunk/gui/ThemeLayout.h	2008-11-03 16:38:47 UTC (rev 34881)
@@ -115,7 +115,7 @@
 		return true;
 	}
 	
-	virtual ThemeLayout *buildCopy() = 0;
+	virtual ThemeLayout *makeClone() = 0;
 	void importLayout(ThemeLayout *layout);
 	
 protected:
@@ -148,7 +148,7 @@
 	const char *getName() { return "Global Layout"; }
 	LayoutType getLayoutType() { return kLayoutMain; }
 	
-	ThemeLayout *buildCopy() { assert(!"Do not copy Main Layouts!"); return 0; }
+	ThemeLayout *makeClone() { assert(!"Do not copy Main Layouts!"); return 0; }
 	
 protected:
 	int16 _defaultX;
@@ -168,11 +168,11 @@
 	LayoutType getLayoutType() { return kLayoutVertical; }
 	
 	
-	ThemeLayout *buildCopy() { 
+	ThemeLayout *makeClone() { 
 		ThemeLayoutVertical *n = new ThemeLayoutVertical(*this);
 		
-		for (uint i = 0; i < n->_children.size(); ++ i)
-			n->_children[i] = n->_children[i]->buildCopy();
+		for (uint i = 0; i < n->_children.size(); ++i)
+			n->_children[i] = n->_children[i]->makeClone();
 		
 		return n;
 	}
@@ -190,11 +190,11 @@
 	const char *getName() { return "Horizontal Layout"; }
 	LayoutType getLayoutType() { return kLayoutHorizontal; }
 	
-	ThemeLayout *buildCopy() { 
+	ThemeLayout *makeClone() { 
 		ThemeLayoutHorizontal *n = new ThemeLayoutHorizontal(*this);
 		
 		for (uint i = 0; i < n->_children.size(); ++ i)
-			n->_children[i] = n->_children[i]->buildCopy();
+			n->_children[i] = n->_children[i]->makeClone();
 		
 		return n;
 	}
@@ -211,7 +211,7 @@
 	void reflowLayout() {}
 	LayoutType getLayoutType() { return kLayoutWidget; }
 	
-	ThemeLayout *buildCopy() { return new ThemeLayoutWidget(*this); }
+	ThemeLayout *makeClone() { return new ThemeLayoutWidget(*this); }
 };
 
 class ThemeLayoutSpacing : public ThemeLayout {
@@ -231,7 +231,7 @@
 	LayoutType getLayoutType() { return kLayoutWidget; }
 	const char *getName() { return "SPACE"; }
 	
-	ThemeLayout *buildCopy() { return new ThemeLayoutSpacing(*this); }
+	ThemeLayout *makeClone() { return new ThemeLayoutSpacing(*this); }
 };
 
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list