Changeset - r386:f55e2bad4d69
[Not reviewed]
master
0 1 0
tron - 20 years ago 2004-11-14 08:11:05
tron@openttd.org
(svn r578) Simplify BringWindowToFront()
1 file changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
window.c
Show inline comments
 
@@ -253,6 +253,7 @@ Window *BringWindowToFrontById(WindowCla
 
Window *BringWindowToFront(Window *w)
 
{
 
	Window *v;
 
	Window temp;
 

	
 
	v = _last_window;
 
	do {
 
@@ -265,14 +266,13 @@ Window *BringWindowToFront(Window *w)
 

	
 
	assert(w < v);
 

	
 
	do {
 
		memswap(w, w+1, sizeof(Window));
 
		w++;
 
	} while (v != w);
 
	temp = *w;
 
	memmove(w, w + 1, (v - w) * sizeof(Window));
 
	*v = temp;
 

	
 
	SetWindowDirty(w);
 
	SetWindowDirty(v);
 

	
 
	return w;
 
	return v;
 
}
 

	
 
Window *AllocateWindow(
0 comments (0 inline, 0 general)