[Scummvm-cvs-logs] SF.net SVN: scummvm: [31324] scummvm/trunk/common
tramboi at users.sourceforge.net
tramboi at users.sourceforge.net
Sun Mar 30 13:56:33 CEST 2008
Revision: 31324
http://scummvm.svn.sourceforge.net/scummvm/?rev=31324&view=rev
Author: tramboi
Date: 2008-03-30 04:56:32 -0700 (Sun, 30 Mar 2008)
Log Message:
-----------
std::max => utils.h MAX
Added GPL headers
Modified Paths:
--------------
scummvm/trunk/common/memorypool.cpp
scummvm/trunk/common/memorypool.h
Modified: scummvm/trunk/common/memorypool.cpp
===================================================================
--- scummvm/trunk/common/memorypool.cpp 2008-03-30 06:37:46 UTC (rev 31323)
+++ scummvm/trunk/common/memorypool.cpp 2008-03-30 11:56:32 UTC (rev 31324)
@@ -1,5 +1,30 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
#include "common/memorypool.h"
-#include <algorithm>
+#include "common/util.h"
namespace Common
{
@@ -23,7 +48,7 @@
MemoryPool::MemoryPool(size_t chunkSize) {
// You must at least fit the pointer in the node (technically unneeded considering the next rounding statement)
- _chunkSize = std::max(chunkSize, sizeof(void*));
+ _chunkSize = MAX(chunkSize, sizeof(void*));
// There might be an alignment problem on some platforms when trying to load a void* on a non natural boundary
// so we round to the next sizeof(void*)
_chunkSize = (_chunkSize + sizeof(void*) - 1) & (~(sizeof(void*) - 1));
@@ -92,7 +117,7 @@
}
}
- printf("%d freed pages\n", freedPagesCount);
+ //printf("%d freed pages\n", freedPagesCount);
}
}
Modified: scummvm/trunk/common/memorypool.h
===================================================================
--- scummvm/trunk/common/memorypool.h 2008-03-30 06:37:46 UTC (rev 31323)
+++ scummvm/trunk/common/memorypool.h 2008-03-30 11:56:32 UTC (rev 31324)
@@ -1,3 +1,28 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
#ifndef COMMON_MEMORYPOOL_H
#define COMMON_MEMORYPOOL_H
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