diff options
author | Jorge Bernal <jbernalmartinez@gmail.com> | 2015-07-12 17:55:33 +0300 |
---|---|---|
committer | Jorge Bernal <jbernalmartinez@gmail.com> | 2015-07-12 17:58:12 +0300 |
commit | 6ffc988ae3aa57822be89e9580146908c938e0a0 (patch) | |
tree | 6c9299a519b8d4b1da0780cf0cd2bc4bba108fb8 /source/gameengine/Expressions/KX_HashedPtr.cpp | |
parent | 5b0f674e0948d079332718e165b4a42369517ed6 (diff) |
BGE Clean-up: New EXP prefix for the BGE Expression module
The expression module now uses an EXP prefix and it follows a
distribution similar to blender.
Additionally the hash function in EXP_HashedPtr.h was simplified and the
files EXP_C-Api.h &.EXP_C-Api.cpp were deleted because were unused.
Reviewers: campbellbarton, moguri, sybren, hg1
Projects: #game_engine
Differential Revision: https://developer.blender.org/D1221
Diffstat (limited to 'source/gameengine/Expressions/KX_HashedPtr.cpp')
-rw-r--r-- | source/gameengine/Expressions/KX_HashedPtr.cpp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/source/gameengine/Expressions/KX_HashedPtr.cpp b/source/gameengine/Expressions/KX_HashedPtr.cpp deleted file mode 100644 index bd42892cc8d..00000000000 --- a/source/gameengine/Expressions/KX_HashedPtr.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * 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. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file gameengine/Expressions/KX_HashedPtr.cpp - * \ingroup expressions - */ - - -#include "KX_HashedPtr.h" - -unsigned int KX_Hash(void *inDWord) -{ -#if defined(_WIN64) && !defined(FREE_WINDOWS64) - unsigned __int64 key = (unsigned __int64)inDWord; -#elif defined(FREE_WINDOWS64) - unsigned long long key = (unsigned long long)inDWord; -#else - unsigned long key = (unsigned long)inDWord; -#endif - - key += ~(key << 16); - key ^= (key >> 5); - key += (key << 3); - key ^= (key >> 13); - key += ~(key << 9); - key ^= (key >> 17); - - return (unsigned int)(key & 0xffffffff); -} - - -CHashedPtr::CHashedPtr(void* val) : m_valptr(val) -{ -} - - - -unsigned int CHashedPtr::hash() const -{ - return KX_Hash(m_valptr); -} |