Bläddra i källkod

Switch from ce_assert to CE_ASSERT

Daniele Bartolini 12 år sedan
förälder
incheckning
578973c7ff
48 ändrade filer med 221 tillägg och 221 borttagningar
  1. 4 4
      src/Filesystem.cpp
  2. 5 5
      src/ResourceManager.cpp
  3. 1 1
      src/ScriptResource.cpp
  4. 2 2
      src/TextResource.cpp
  5. 3 3
      src/TextureResource.cpp
  6. 2 2
      src/core/Args.cpp
  7. 3 3
      src/core/Assert.h
  8. 1 1
      src/core/bv/Box.h
  9. 1 1
      src/core/bv/Frustum.cpp
  10. 1 1
      src/core/bv/Rect.cpp
  11. 2 2
      src/core/compressors/ZipCompressor.cpp
  12. 2 2
      src/core/containers/IdTable.h
  13. 7 7
      src/core/containers/List.h
  14. 6 6
      src/core/containers/Queue.h
  15. 6 6
      src/core/containers/RBTree.h
  16. 3 3
      src/core/math/Mat3.cpp
  17. 3 3
      src/core/math/Mat4.cpp
  18. 1 1
      src/core/math/MathUtils.h
  19. 4 4
      src/core/math/Point2.h
  20. 4 4
      src/core/math/Vec2.h
  21. 4 4
      src/core/math/Vec3.h
  22. 4 4
      src/core/math/Vec4.h
  23. 1 1
      src/core/mem/ProxyAllocator.cpp
  24. 2 2
      src/core/streams/FileStream.cpp
  25. 1 1
      src/core/streams/FileStream.h
  26. 2 2
      src/core/streams/MemoryStream.cpp
  27. 3 3
      src/core/streams/MemoryStream.h
  28. 3 3
      src/core/strings/Hash.h
  29. 13 13
      src/core/strings/Path.h
  30. 11 11
      src/core/strings/String.h
  31. 4 4
      src/input/EventDispatcher.cpp
  32. 6 6
      src/os/android/File.cpp
  33. 1 1
      src/os/linux/GLXRenderWindow.cpp
  34. 3 3
      src/os/linux/LinuxOS.cpp
  35. 8 8
      src/os/posix/File.cpp
  36. 2 2
      src/os/posix/TCPSocket.cpp
  37. 3 3
      src/os/posix/UDPSocket.cpp
  38. 4 4
      src/os/win/WinTCPSocket.cpp
  39. 7 7
      src/os/win/WinUDPSocket.cpp
  40. 11 11
      src/renderers/gl/GLRenderer.cpp
  41. 2 2
      src/renderers/gles/GLESRenderer.cpp
  42. 6 6
      src/renderers/gles/GLESUtils.h
  43. 2 2
      tests/allocators.cpp
  44. 8 8
      tests/containers.cpp
  45. 32 32
      tests/paths.cpp
  46. 12 12
      tests/strings.cpp
  47. 3 3
      tools/editors/fontgen/fontgen.cpp
  48. 2 2
      tools/editors/world-editor/terrain/Heightfield.cpp

+ 4 - 4
src/Filesystem.cpp

@@ -34,8 +34,8 @@ namespace crown
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 Filesystem::Filesystem(const char* root_path)
 Filesystem::Filesystem(const char* root_path)
 {
 {
-	ce_assert(root_path != NULL, "Root path must be != NULL");
-	ce_assert(os::is_absolute_path(root_path), "Root path must be absolute");
+	CE_ASSERT(root_path != NULL, "Root path must be != NULL");
+	CE_ASSERT(os::is_absolute_path(root_path), "Root path must be absolute");
 
 
 	string::strncpy(m_root_path, root_path, os::MAX_PATH_LENGTH);
 	string::strncpy(m_root_path, root_path, os::MAX_PATH_LENGTH);
 }
 }
@@ -188,8 +188,8 @@ FileStream* Filesystem::open(const char* relative_path, StreamOpenMode mode)
 {
 {
 	FilesystemEntry info;
 	FilesystemEntry info;
 
 
-	ce_assert(get_info(relative_path, info), "File does not exist: %s", relative_path);
-	ce_assert(info.type == FilesystemEntry::FILE, "File is not a regular file: %s", relative_path);
+	CE_ASSERT(get_info(relative_path, info), "File does not exist: %s", relative_path);
+	CE_ASSERT(info.type == FilesystemEntry::FILE, "File is not a regular file: %s", relative_path);
 
 
 	return new FileStream(mode, info.os_path);
 	return new FileStream(mode, info.os_path);
 }
 }

+ 5 - 5
src/ResourceManager.cpp

@@ -91,7 +91,7 @@ ResourceId ResourceManager::load(const char* name)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void ResourceManager::unload(ResourceId name)
 void ResourceManager::unload(ResourceId name)
 {
 {
-	ce_assert(has(name), "Resource not loaded: %.8X%.8X", name.name, name.type);
+	CE_ASSERT(has(name), "Resource not loaded: %.8X%.8X", name.name, name.type);
 	
 	
 	m_resources_mutex.lock();
 	m_resources_mutex.lock();
 
 
@@ -115,7 +115,7 @@ void ResourceManager::unload(ResourceId name)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void ResourceManager::reload(ResourceId name)
 void ResourceManager::reload(ResourceId name)
 {
 {
-	ce_assert(has(name), "Resource not loaded: %.8X%.8X", name.name, name.type);
+	CE_ASSERT(has(name), "Resource not loaded: %.8X%.8X", name.name, name.type);
 	
 	
 	m_resources_mutex.lock();
 	m_resources_mutex.lock();
 
 
@@ -155,7 +155,7 @@ bool ResourceManager::has(ResourceId name) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 const void* ResourceManager::data(ResourceId name) const
 const void* ResourceManager::data(ResourceId name) const
 {
 {
-	ce_assert(has(name), "Resource not loaded: %.8X%.8X", name.name, name.type);
+	CE_ASSERT(has(name), "Resource not loaded: %.8X%.8X", name.name, name.type);
 	
 	
 	m_resources_mutex.lock();
 	m_resources_mutex.lock();
 
 
@@ -169,7 +169,7 @@ const void* ResourceManager::data(ResourceId name) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 bool ResourceManager::is_loaded(ResourceId name) const
 bool ResourceManager::is_loaded(ResourceId name) const
 {
 {
-	ce_assert(has(name), "Resource not loaded: %.8X%.8X", name.name, name.type);
+	CE_ASSERT(has(name), "Resource not loaded: %.8X%.8X", name.name, name.type);
 
 
 	m_resources_mutex.lock();
 	m_resources_mutex.lock();
 
 
@@ -183,7 +183,7 @@ bool ResourceManager::is_loaded(ResourceId name) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 uint32_t ResourceManager::references(ResourceId name) const
 uint32_t ResourceManager::references(ResourceId name) const
 {
 {
-	ce_assert(has(name), "Resource not loaded: %.8X%.8X", name.name, name.type);
+	CE_ASSERT(has(name), "Resource not loaded: %.8X%.8X", name.name, name.type);
 
 
 	m_resources_mutex.lock();
 	m_resources_mutex.lock();
 
 

+ 1 - 1
src/ScriptResource.cpp

@@ -41,7 +41,7 @@ void ScriptResource::online(void* resource)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void ScriptResource::unload(Allocator& allocator, void* resource)
 void ScriptResource::unload(Allocator& allocator, void* resource)
 {
 {
-	ce_assert(resource != NULL, "");
+	CE_ASSERT(resource != NULL, "");
 
 
 	allocator.deallocate(((ScriptResource*)resource)->m_data);
 	allocator.deallocate(((ScriptResource*)resource)->m_data);
 	allocator.deallocate(resource);
 	allocator.deallocate(resource);

+ 2 - 2
src/TextResource.cpp

@@ -12,7 +12,7 @@ void* TextResource::load(Allocator& allocator, ResourceArchive& archive, Resourc
 {
 {
 	FileStream* stream = archive.open(id);
 	FileStream* stream = archive.open(id);
 
 
-	ce_assert(stream != NULL, "Resource does not exist: %.8X%.8X", id.name, id.type);
+	CE_ASSERT(stream != NULL, "Resource does not exist: %.8X%.8X", id.name, id.type);
 
 
 	TextResource* resource = (TextResource*)allocator.allocate(sizeof(TextResource));
 	TextResource* resource = (TextResource*)allocator.allocate(sizeof(TextResource));
 
 
@@ -32,7 +32,7 @@ void* TextResource::load(Allocator& allocator, ResourceArchive& archive, Resourc
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void TextResource::unload(Allocator& allocator, void* resource)
 void TextResource::unload(Allocator& allocator, void* resource)
 {
 {
-	ce_assert(resource != NULL, "Resource not loaded");
+	CE_ASSERT(resource != NULL, "Resource not loaded");
 
 
 	((TextResource*)resource)->length = 0;
 	((TextResource*)resource)->length = 0;
 
 

+ 3 - 3
src/TextureResource.cpp

@@ -15,7 +15,7 @@ void* TextureResource::load(Allocator& allocator, ResourceArchive& archive, Reso
 {
 {
 	FileStream* stream = archive.open(id);
 	FileStream* stream = archive.open(id);
 
 
-	ce_assert(stream != NULL, "Resource does not exist: %.8X%.8X", id.name, id.type);
+	CE_ASSERT(stream != NULL, "Resource does not exist: %.8X%.8X", id.name, id.type);
 
 
 	TextureResource* resource = (TextureResource*)allocator.allocate(sizeof(TextureResource));
 	TextureResource* resource = (TextureResource*)allocator.allocate(sizeof(TextureResource));
 
 
@@ -37,13 +37,13 @@ void* TextureResource::load(Allocator& allocator, ResourceArchive& archive, Reso
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void TextureResource::online(void* resource)
 void TextureResource::online(void* resource)
 {
 {
-	ce_assert(resource != NULL, "Resource not loaded");
+	CE_ASSERT(resource != NULL, "Resource not loaded");
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void TextureResource::unload(Allocator& allocator, void* resource)
 void TextureResource::unload(Allocator& allocator, void* resource)
 {
 {
-	ce_assert(resource != NULL, "Resource not loaded");
+	CE_ASSERT(resource != NULL, "Resource not loaded");
 
 
 	allocator.deallocate(((TextureResource*)resource)->m_data);
 	allocator.deallocate(((TextureResource*)resource)->m_data);
 	allocator.deallocate(resource);
 	allocator.deallocate(resource);

+ 2 - 2
src/core/Args.cpp

@@ -39,8 +39,8 @@ Args::Args(int argc, char** argv, const char* shortopts, const ArgsOption* longo
 	m_scope(argc),
 	m_scope(argc),
 	m_optarg(NULL)
 	m_optarg(NULL)
 {
 {
-	ce_assert(argv != NULL, "Argument vector must be != NULL");
-	ce_assert(shortopts != NULL, "Short argument list must be != NULL");
+	CE_ASSERT(argv != NULL, "Argument vector must be != NULL");
+	CE_ASSERT(shortopts != NULL, "Short argument list must be != NULL");
 	// longopts could be NULL
 	// longopts could be NULL
 }
 }
 
 

+ 3 - 3
src/core/Assert.h

@@ -30,10 +30,10 @@ OTHER DEALINGS IN THE SOFTWARE.
 #pragma once
 #pragma once
 
 
 #ifdef CROWN_DEBUG
 #ifdef CROWN_DEBUG
-	#define ce_error(file, line, message, ...) do { printf(message, __VA_ARGS__);\
+	#define CE_ERROR(file, line, message, ...) do { printf(message, __VA_ARGS__);\
 				printf("\n\tIn %s:%d\n\n", file, line); abort(); } while(0)
 				printf("\n\tIn %s:%d\n\n", file, line); abort(); } while(0)
-	#define ce_assert(condition, message, ...) do { if (!(condition)) { ce_error(__FILE__, __LINE__,\
+	#define CE_ASSERT(condition, message, ...) do { if (!(condition)) { CE_ERROR(__FILE__, __LINE__,\
 				"Assertion failed: %s\n\t" message, #condition, ##__VA_ARGS__); } } while(0)
 				"Assertion failed: %s\n\t" message, #condition, ##__VA_ARGS__); } } while(0)
 #else
 #else
-	#define ce_assert(condition, message, ...) ((void)0)
+	#define CE_ASSERT(condition, message, ...) ((void)0)
 #endif
 #endif

+ 1 - 1
src/core/bv/Box.h

@@ -271,7 +271,7 @@ inline void Box::to_vertices(Vec3 v[8]) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline Vec3 Box::vertex(uint32_t index) const
 inline Vec3 Box::vertex(uint32_t index) const
 {
 {
-	ce_assert(index < 8, "Index must be < 8");
+	CE_ASSERT(index < 8, "Index must be < 8");
 
 
 	switch (index)
 	switch (index)
 	{
 	{

+ 1 - 1
src/core/bv/Frustum.cpp

@@ -63,7 +63,7 @@ bool Frustum::contains_point(const Vec3& point) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 Vec3 Frustum::vertex(uint32_t index) const
 Vec3 Frustum::vertex(uint32_t index) const
 {
 {
-	ce_assert(index < 8, "Index must be < 8");
+	CE_ASSERT(index < 8, "Index must be < 8");
 
 
 	// 0 = Near bottom left
 	// 0 = Near bottom left
 	// 1 = Near bottom right
 	// 1 = Near bottom right

+ 1 - 1
src/core/bv/Rect.cpp

@@ -75,7 +75,7 @@ void Rect::vertices(Vec2 v[4]) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 Vec2 Rect::vertex(uint32_t index) const
 Vec2 Rect::vertex(uint32_t index) const
 {
 {
-	ce_assert(index < 4, "Index must be < 4");
+	CE_ASSERT(index < 4, "Index must be < 4");
 
 
 	switch (index)
 	switch (index)
 	{
 	{

+ 2 - 2
src/core/compressors/ZipCompressor.cpp

@@ -52,7 +52,7 @@ uint8_t* ZipCompressor::compress(const void* data, size_t in_size, size_t& out_s
 	
 	
 	int32_t ret = ::compress((Bytef*)dest, (uLongf*)&out_size, (const Bytef*)data, (uLongf)in_size);
 	int32_t ret = ::compress((Bytef*)dest, (uLongf*)&out_size, (const Bytef*)data, (uLongf)in_size);
 	
 	
-	ce_assert(ret == Z_OK, "Failed to compress the data");
+	CE_ASSERT(ret == Z_OK, "Failed to compress the data");
 	
 	
 	return dest;
 	return dest;
 }
 }
@@ -66,7 +66,7 @@ uint8_t* ZipCompressor::uncompress(const void* data, size_t in_size, size_t& out
 	
 	
 	int32_t ret = ::uncompress((Bytef*)dest, (uLongf*)&out_size, (const Bytef*)data, (uLongf)in_size);
 	int32_t ret = ::uncompress((Bytef*)dest, (uLongf*)&out_size, (const Bytef*)data, (uLongf)in_size);
 	
 	
-	ce_assert(ret == Z_OK, "Failed to uncompress the data");
+	CE_ASSERT(ret == Z_OK, "Failed to uncompress the data");
 	
 	
 	return dest;
 	return dest;
 }
 }

+ 2 - 2
src/core/containers/IdTable.h

@@ -134,7 +134,7 @@ inline Id IdTable::create()
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline void IdTable::destroy(Id id)
 inline void IdTable::destroy(Id id)
 {
 {
-	ce_assert(has(id), "IdTable does not have ID: %d,%d", id.id, id.index);
+	CE_ASSERT(has(id), "IdTable does not have ID: %d,%d", id.id, id.index);
 
 
 	m_ids[id.index].next = m_freelist;
 	m_ids[id.index].next = m_freelist;
 	m_freelist = id.index;
 	m_freelist = id.index;
@@ -149,7 +149,7 @@ inline bool IdTable::has(Id id) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline uint16_t IdTable::next_id()
 inline uint16_t IdTable::next_id()
 {
 {
-	ce_assert(m_next_id < m_max_ids, "Maximum number of IDs reached");
+	CE_ASSERT(m_next_id < m_max_ids, "Maximum number of IDs reached");
 
 
 	return m_next_id++;
 	return m_next_id++;
 }
 }

+ 7 - 7
src/core/containers/List.h

@@ -165,7 +165,7 @@ inline List<T>::~List()
 template <typename T>
 template <typename T>
 inline T& List<T>::operator[](uint32_t index)
 inline T& List<T>::operator[](uint32_t index)
 {
 {
-	//ce_assert(index < m_size);
+	//CE_ASSERT(index < m_size);
 
 
 	return m_array[index];
 	return m_array[index];
 }
 }
@@ -174,7 +174,7 @@ inline T& List<T>::operator[](uint32_t index)
 template <typename T>
 template <typename T>
 inline const T& List<T>::operator[](uint32_t index) const
 inline const T& List<T>::operator[](uint32_t index) const
 {
 {
-	//ce_assert(index < m_size);
+	//CE_ASSERT(index < m_size);
 
 
 	return m_array[index];
 	return m_array[index];
 }
 }
@@ -291,7 +291,7 @@ inline uint32_t List<T>::push_back(const T& item)
 template <typename T>
 template <typename T>
 inline void List<T>::pop_back()
 inline void List<T>::pop_back()
 {
 {
-	ce_assert(m_size > 0, "The list is empty");
+	CE_ASSERT(m_size > 0, "The list is empty");
 
 
 	m_size--;
 	m_size--;
 }
 }
@@ -372,7 +372,7 @@ inline T* List<T>::end()
 template <typename T>
 template <typename T>
 inline T& List<T>::front()
 inline T& List<T>::front()
 {
 {
-	ce_assert(m_size > 0, "The list is empty");
+	CE_ASSERT(m_size > 0, "The list is empty");
 
 
 	return m_array[0];
 	return m_array[0];
 }
 }
@@ -381,7 +381,7 @@ inline T& List<T>::front()
 template <typename T>
 template <typename T>
 inline const T& List<T>::front() const
 inline const T& List<T>::front() const
 {
 {
-	ce_assert(m_size > 0, "The list is empty");
+	CE_ASSERT(m_size > 0, "The list is empty");
 
 
 	return m_array[0];
 	return m_array[0];
 }
 }
@@ -390,7 +390,7 @@ inline const T& List<T>::front() const
 template <typename T>
 template <typename T>
 inline T& List<T>::back()
 inline T& List<T>::back()
 {
 {
-	ce_assert(m_size > 0, "The list is empty");
+	CE_ASSERT(m_size > 0, "The list is empty");
 
 
 	return m_array[m_size - 1];
 	return m_array[m_size - 1];
 }
 }
@@ -399,7 +399,7 @@ inline T& List<T>::back()
 template <typename T>
 template <typename T>
 inline const T& List<T>::back() const
 inline const T& List<T>::back() const
 {
 {
-	ce_assert(m_size > 0, "The list is empty");
+	CE_ASSERT(m_size > 0, "The list is empty");
 
 
 	return m_array[m_size - 1];
 	return m_array[m_size - 1];
 }
 }

+ 6 - 6
src/core/containers/Queue.h

@@ -207,7 +207,7 @@ inline void Queue<T>::push_back(const T& item)
 template <typename T>
 template <typename T>
 inline void Queue<T>::pop_back()
 inline void Queue<T>::pop_back()
 {
 {
-	ce_assert(m_size > 0, "The queue is empty");
+	CE_ASSERT(m_size > 0, "The queue is empty");
 
 
 	m_size--;
 	m_size--;
 }
 }
@@ -232,7 +232,7 @@ inline void Queue<T>::push_front(const T& item)
 template <typename T>
 template <typename T>
 inline void Queue<T>::pop_front()
 inline void Queue<T>::pop_front()
 {
 {
-	ce_assert(m_size > 0, "The queue is empty");
+	CE_ASSERT(m_size > 0, "The queue is empty");
 
 
 	m_read = (m_read + 1) % m_queue.size();
 	m_read = (m_read + 1) % m_queue.size();
 
 
@@ -283,7 +283,7 @@ inline const T* Queue<T>::end() const
 template <typename T>
 template <typename T>
 inline T& Queue<T>::front()
 inline T& Queue<T>::front()
 {
 {
-	ce_assert(m_size > 0, "The queue is empty");
+	CE_ASSERT(m_size > 0, "The queue is empty");
 
 
 	return m_queue[m_read];
 	return m_queue[m_read];
 }
 }
@@ -292,7 +292,7 @@ inline T& Queue<T>::front()
 template <typename T>
 template <typename T>
 inline const T& Queue<T>::front() const
 inline const T& Queue<T>::front() const
 {
 {
-	ce_assert(m_size > 0, "The queue is empty");
+	CE_ASSERT(m_size > 0, "The queue is empty");
 
 
 	return m_queue[m_read];
 	return m_queue[m_read];
 }
 }
@@ -301,7 +301,7 @@ inline const T& Queue<T>::front() const
 template <typename T>
 template <typename T>
 inline T& Queue<T>::back()
 inline T& Queue<T>::back()
 {
 {
-	ce_assert(m_size > 0, "The queue is empty");
+	CE_ASSERT(m_size > 0, "The queue is empty");
 
 
 	return (*this)[m_size - 1];
 	return (*this)[m_size - 1];
 }
 }
@@ -310,7 +310,7 @@ inline T& Queue<T>::back()
 template <typename T>
 template <typename T>
 inline const T& Queue<T>::back() const
 inline const T& Queue<T>::back() const
 {
 {
-	ce_assert(m_size > 0, "The queue is empty");
+	CE_ASSERT(m_size > 0, "The queue is empty");
 
 
 	return (*this)[m_size - 1];
 	return (*this)[m_size - 1];
 }
 }

+ 6 - 6
src/core/containers/RBTree.h

@@ -656,19 +656,19 @@ int32_t RBTree<TKey, TValue>::dbg_verify(Node* n) const
 
 
 	if (n->left != m_sentinel)
 	if (n->left != m_sentinel)
 	{
 	{
-		ce_assert(n->left->parent == n);
-		ce_assert(n->item.key > n->left->item.key);
+		CE_ASSERT(n->left->parent == n);
+		CE_ASSERT(n->item.key > n->left->item.key);
 	}
 	}
 
 
 	if (n->right != m_sentinel)
 	if (n->right != m_sentinel)
 	{
 	{
-		ce_assert(n->right->parent == n);
-		ce_assert(n->item.key < n->right->item.key);
+		CE_ASSERT(n->right->parent == n);
+		CE_ASSERT(n->item.key < n->right->item.key);
 	}
 	}
 
 
 	int32_t bhL = dbg_verify(n->left);
 	int32_t bhL = dbg_verify(n->left);
 	int32_t bhR = dbg_verify(n->right);
 	int32_t bhR = dbg_verify(n->right);
-	ce_assert(bhL == bhR);
+	CE_ASSERT(bhL == bhR);
 
 
 	if (n->color == BLACK)
 	if (n->color == BLACK)
 	{
 	{
@@ -678,7 +678,7 @@ int32_t RBTree<TKey, TValue>::dbg_verify(Node* n) const
 	{
 	{
 		if (n->parent != NULL && n->parent->color == RED)
 		if (n->parent != NULL && n->parent->color == RED)
 		{
 		{
-			ce_assert(false);
+			CE_ASSERT(false);
 		}
 		}
 	}
 	}
 
 

+ 3 - 3
src/core/math/Mat3.cpp

@@ -103,7 +103,7 @@ Mat3& Mat3::operator=(const Mat3& a)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 real Mat3::operator[](uint32_t i) const
 real Mat3::operator[](uint32_t i) const
 {
 {
-	ce_assert(i < 9, "Index must be < 9");
+	CE_ASSERT(i < 9, "Index must be < 9");
 
 
 	return m[i];
 	return m[i];
 }
 }
@@ -111,7 +111,7 @@ real Mat3::operator[](uint32_t i) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 real& Mat3::operator[](uint32_t i)
 real& Mat3::operator[](uint32_t i)
 {
 {
-	ce_assert(i < 9, "Index must be < 9");
+	CE_ASSERT(i < 9, "Index must be < 9");
 
 
 	return m[i];
 	return m[i];
 }
 }
@@ -119,7 +119,7 @@ real& Mat3::operator[](uint32_t i)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 real Mat3::operator()(uint32_t row, uint32_t column) const
 real Mat3::operator()(uint32_t row, uint32_t column) const
 {
 {
-	ce_assert(row < 3 && column < 3, "Row and column must be < 3");
+	CE_ASSERT(row < 3 && column < 3, "Row and column must be < 3");
 
 
 	return m[row + column * 3];
 	return m[row + column * 3];
 }
 }

+ 3 - 3
src/core/math/Mat4.cpp

@@ -132,7 +132,7 @@ Mat4& Mat4::operator=(const Mat4& a)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 real Mat4::operator[](uint32_t i) const
 real Mat4::operator[](uint32_t i) const
 {
 {
-	ce_assert(i < 16, "Index must be < 16");
+	CE_ASSERT(i < 16, "Index must be < 16");
 
 
 	return m[i];
 	return m[i];
 }
 }
@@ -140,7 +140,7 @@ real Mat4::operator[](uint32_t i) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 real& Mat4::operator[](uint32_t i)
 real& Mat4::operator[](uint32_t i)
 {
 {
-	ce_assert(i < 16, "Index must be < 16");
+	CE_ASSERT(i < 16, "Index must be < 16");
 
 
 	return m[i];
 	return m[i];
 }
 }
@@ -148,7 +148,7 @@ real& Mat4::operator[](uint32_t i)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 real Mat4::operator()(uint32_t row, uint32_t column) const
 real Mat4::operator()(uint32_t row, uint32_t column) const
 {
 {
-	ce_assert(row < 4 && column < 4, "Row and column must be < 4");
+	CE_ASSERT(row < 4 && column < 4, "Row and column must be < 4");
 
 
 	return m[row + column * 4];
 	return m[row + column * 4];
 }
 }

+ 1 - 1
src/core/math/MathUtils.h

@@ -190,7 +190,7 @@ inline T avg(const T& a, const T& b)
 template <typename T>
 template <typename T>
 inline T clamp_to_range(const T& min, const T& max, const T& value)
 inline T clamp_to_range(const T& min, const T& max, const T& value)
 {
 {
-	ce_assert(min < max, "Min must be < max");
+	CE_ASSERT(min < max, "Min must be < max");
 
 
 	if (value > max)
 	if (value > max)
 	{
 	{

+ 4 - 4
src/core/math/Point2.h

@@ -119,7 +119,7 @@ inline Point2::~Point2()
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline int32_t Point2::operator[](uint32_t i) const
 inline int32_t Point2::operator[](uint32_t i) const
 {
 {
-	ce_assert(i < 2, "Index must be < 2");
+	CE_ASSERT(i < 2, "Index must be < 2");
 
 
 	return (&x)[i];
 	return (&x)[i];
 }
 }
@@ -127,7 +127,7 @@ inline int32_t Point2::operator[](uint32_t i) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline int32_t& Point2::operator[](uint32_t i)
 inline int32_t& Point2::operator[](uint32_t i)
 {
 {
-	ce_assert(i < 2, "Index must be < 2");
+	CE_ASSERT(i < 2, "Index must be < 2");
 
 
 	return (&x)[i];
 	return (&x)[i];
 }
 }
@@ -180,7 +180,7 @@ inline Point2& Point2::operator*=(int32_t k)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline Point2 Point2::operator/(int32_t k) const
 inline Point2 Point2::operator/(int32_t k) const
 {
 {
-	ce_assert(k != 0, "Division by zero");
+	CE_ASSERT(k != 0, "Division by zero");
 
 
 	return Point2(x / k, y / k);
 	return Point2(x / k, y / k);
 }
 }
@@ -188,7 +188,7 @@ inline Point2 Point2::operator/(int32_t k) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline Point2& Point2::operator/=(int32_t k)
 inline Point2& Point2::operator/=(int32_t k)
 {
 {
-	ce_assert(k != 0, "Division by zero");
+	CE_ASSERT(k != 0, "Division by zero");
 
 
 	x /= k;
 	x /= k;
 	y /= k;
 	y /= k;

+ 4 - 4
src/core/math/Vec2.h

@@ -154,7 +154,7 @@ inline Vec2::Vec2(const Vec2& a) : x(a.x), y(a.y)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline real Vec2::operator[](uint32_t i) const
 inline real Vec2::operator[](uint32_t i) const
 {
 {
-	ce_assert(i < 2, "Index must be < 2");
+	CE_ASSERT(i < 2, "Index must be < 2");
 
 
 	return (&x)[i];
 	return (&x)[i];
 }
 }
@@ -162,7 +162,7 @@ inline real Vec2::operator[](uint32_t i) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline real& Vec2::operator[](uint32_t i)
 inline real& Vec2::operator[](uint32_t i)
 {
 {
-	ce_assert(i < 2, "Index must be < 2");
+	CE_ASSERT(i < 2, "Index must be < 2");
 
 
 	return (&x)[i];
 	return (&x)[i];
 }
 }
@@ -215,7 +215,7 @@ inline Vec2& Vec2::operator*=(real k)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline Vec2 Vec2::operator/(real k) const
 inline Vec2 Vec2::operator/(real k) const
 {
 {
-	ce_assert(k != (real)0.0, "Division by zero");
+	CE_ASSERT(k != (real)0.0, "Division by zero");
 
 
 	real inv = (real)(1.0 / k);
 	real inv = (real)(1.0 / k);
 
 
@@ -225,7 +225,7 @@ inline Vec2 Vec2::operator/(real k) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline Vec2& Vec2::operator/=(real k)
 inline Vec2& Vec2::operator/=(real k)
 {
 {
-	ce_assert(k != (real)0.0, "Division by zero");
+	CE_ASSERT(k != (real)0.0, "Division by zero");
 
 
 	real inv = (real)(1.0 / k);
 	real inv = (real)(1.0 / k);
 
 

+ 4 - 4
src/core/math/Vec3.h

@@ -160,7 +160,7 @@ inline Vec3::Vec3(const Vec3& a) : x(a.x), y(a.y), z(a.z)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline real Vec3::operator[](uint32_t i) const
 inline real Vec3::operator[](uint32_t i) const
 {
 {
-	ce_assert(i < 3, "Index must be < 3");
+	CE_ASSERT(i < 3, "Index must be < 3");
 
 
 	return (&x)[i];
 	return (&x)[i];
 }
 }
@@ -168,7 +168,7 @@ inline real Vec3::operator[](uint32_t i) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline real& Vec3::operator[](uint32_t i)
 inline real& Vec3::operator[](uint32_t i)
 {
 {
-	ce_assert(i < 3, "Index must be < 3");
+	CE_ASSERT(i < 3, "Index must be < 3");
 
 
 	return (&x)[i];
 	return (&x)[i];
 }
 }
@@ -224,7 +224,7 @@ inline Vec3& Vec3::operator*=(real k)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline Vec3 Vec3::operator/(real k) const
 inline Vec3 Vec3::operator/(real k) const
 {
 {
-	ce_assert(k != (real)0.0, "Division by zero");
+	CE_ASSERT(k != (real)0.0, "Division by zero");
 
 
 	real inv = (real)(1.0 / k);
 	real inv = (real)(1.0 / k);
 
 
@@ -234,7 +234,7 @@ inline Vec3 Vec3::operator/(real k) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline Vec3& Vec3::operator/=(real k)
 inline Vec3& Vec3::operator/=(real k)
 {
 {
-	ce_assert(k != (real)0.0, "Division by zero");
+	CE_ASSERT(k != (real)0.0, "Division by zero");
 
 
 	real inv = (real)(1.0 / k);
 	real inv = (real)(1.0 / k);
 
 

+ 4 - 4
src/core/math/Vec4.h

@@ -154,7 +154,7 @@ inline Vec4::Vec4(const Vec4& a) : x(a.x), y(a.y), z(a.z), w(a.w)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline real Vec4::operator[](uint32_t i) const
 inline real Vec4::operator[](uint32_t i) const
 {
 {
-	ce_assert(i < 4, "Index must be < 4");
+	CE_ASSERT(i < 4, "Index must be < 4");
 
 
 	return (&x)[i];
 	return (&x)[i];
 }
 }
@@ -162,7 +162,7 @@ inline real Vec4::operator[](uint32_t i) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline real& Vec4::operator[](uint32_t i)
 inline real& Vec4::operator[](uint32_t i)
 {
 {
-	ce_assert(i < 4, "Index must be < 4");
+	CE_ASSERT(i < 4, "Index must be < 4");
 
 
 	return (&x)[i];
 	return (&x)[i];
 }
 }
@@ -221,7 +221,7 @@ inline Vec4& Vec4::operator*=(real k)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline Vec4 Vec4::operator/(real k) const
 inline Vec4 Vec4::operator/(real k) const
 {
 {
-	ce_assert(k != (real)0.0, "Division by zero");
+	CE_ASSERT(k != (real)0.0, "Division by zero");
 
 
 	real inv = (real)(1.0 / k);
 	real inv = (real)(1.0 / k);
 
 
@@ -231,7 +231,7 @@ inline Vec4 Vec4::operator/(real k) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline Vec4& Vec4::operator/=(real k)
 inline Vec4& Vec4::operator/=(real k)
 {
 {
-	ce_assert(k != (real)0.0, "Division by zero");
+	CE_ASSERT(k != (real)0.0, "Division by zero");
 
 
 	real inv = (real)(1.0 / k);
 	real inv = (real)(1.0 / k);
 
 

+ 1 - 1
src/core/mem/ProxyAllocator.cpp

@@ -35,7 +35,7 @@ ProxyAllocator::ProxyAllocator(Allocator& allocator, const char* name) :
 	m_allocator(allocator),
 	m_allocator(allocator),
 	m_name(name)
 	m_name(name)
 {
 {
-	ce_assert(name != NULL, "Name must be != NULL");
+	CE_ASSERT(name != NULL, "Name must be != NULL");
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 2 - 2
src/core/streams/FileStream.cpp

@@ -81,7 +81,7 @@ void FileStream::read(void* buffer, size_t size)
 	}
 	}
 
 
 	size_t bytes_read = m_file.read(buffer, size);
 	size_t bytes_read = m_file.read(buffer, size);
-	ce_assert(bytes_read == size, "Failed to read from file");
+	CE_ASSERT(bytes_read == size, "Failed to read from file");
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
@@ -96,7 +96,7 @@ void FileStream::write(const void* buffer, size_t size)
 	}
 	}
 
 
 	size_t bytes_written = m_file.write(buffer, size);
 	size_t bytes_written = m_file.write(buffer, size);
-	ce_assert(bytes_written == size, "Failed to write to file");
+	CE_ASSERT(bytes_written == size, "Failed to write to file");
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 1 - 1
src/core/streams/FileStream.h

@@ -95,7 +95,7 @@ protected:
 
 
 	inline void		check_valid() const
 	inline void		check_valid() const
 	{
 	{
-		ce_assert(m_file.is_open(), "File is not open");
+		CE_ASSERT(m_file.is_open(), "File is not open");
 	}
 	}
 };
 };
 
 

+ 2 - 2
src/core/streams/MemoryStream.cpp

@@ -122,7 +122,7 @@ void MemoryStream::seek(size_t position)
 
 
 	// Allow seek to m_memory->size() position, that means end of stream,
 	// Allow seek to m_memory->size() position, that means end of stream,
 	// reading not allowed but you can write if it's dynamic
 	// reading not allowed but you can write if it's dynamic
-	ce_assert(m_memory_offset <= m_memory->size(), "Trying to seek beyond end of stream");
+	CE_ASSERT(m_memory_offset <= m_memory->size(), "Trying to seek beyond end of stream");
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
@@ -141,7 +141,7 @@ void MemoryStream::skip(size_t bytes)
 	m_memory_offset += bytes;
 	m_memory_offset += bytes;
 
 
 	//Allow seek to m_memory->getSize() position, that means end of stream, reading not allowed but you can write if it's dynamic
 	//Allow seek to m_memory->getSize() position, that means end of stream, reading not allowed but you can write if it's dynamic
-	ce_assert(m_memory_offset <= m_memory->size(), "Trying to skip beyond end of stream");
+	CE_ASSERT(m_memory_offset <= m_memory->size(), "Trying to skip beyond end of stream");
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 3 - 3
src/core/streams/MemoryStream.h

@@ -115,10 +115,10 @@ public:
 	bool				end_of_stream() const { return size() == m_memory_offset; }
 	bool				end_of_stream() const { return size() == m_memory_offset; }
 
 
 	/// @copydoc Stream::is_valid()
 	/// @copydoc Stream::is_valid()
-	bool				is_valid() const { ce_assert(m_memory != NULL, "Memory is NULL"); return m_memory->is_valid(); }
+	bool				is_valid() const { CE_ASSERT(m_memory != NULL, "Memory is NULL"); return m_memory->is_valid(); }
 
 
 	/// @copydoc Stream::size()
 	/// @copydoc Stream::size()
-	size_t				size() const { ce_assert(m_memory != NULL, "Memory is NULL"); return m_memory->size(); }
+	size_t				size() const { CE_ASSERT(m_memory != NULL, "Memory is NULL"); return m_memory->size(); }
 
 
 	/// @copydoc Stream::position()
 	/// @copydoc Stream::position()
 	size_t				position() const { return m_memory_offset; }
 	size_t				position() const { return m_memory_offset; }
@@ -137,7 +137,7 @@ public:
 
 
 protected:
 protected:
 
 
-	inline void			check_valid() { ce_assert(m_memory != NULL, "Memory is NULL"); }
+	inline void			check_valid() { CE_ASSERT(m_memory != NULL, "Memory is NULL"); }
 
 
 	MemoryBuffer*		m_memory;
 	MemoryBuffer*		m_memory;
 	size_t				m_memory_offset;
 	size_t				m_memory_offset;

+ 3 - 3
src/core/strings/Hash.h

@@ -62,7 +62,7 @@ uint64_t fnv1a_64(const void* key, size_t len);
 ///    machines.
 ///    machines.
 inline uint32_t murmur2_32(const void* key, size_t len, uint32_t seed)
 inline uint32_t murmur2_32(const void* key, size_t len, uint32_t seed)
 {
 {
-	ce_assert(key != NULL, "Key must be != NULL");
+	CE_ASSERT(key != NULL, "Key must be != NULL");
 
 
 	// 'm' and 'r' are mixing constants generated offline.
 	// 'm' and 'r' are mixing constants generated offline.
 	// They're not really 'magic', they just happen to work well.
 	// They're not really 'magic', they just happen to work well.
@@ -112,7 +112,7 @@ inline uint32_t murmur2_32(const void* key, size_t len, uint32_t seed)
 /// FNV-1a hash, 32 bit
 /// FNV-1a hash, 32 bit
 inline uint32_t fnv1a_32(const void* key, size_t len)
 inline uint32_t fnv1a_32(const void* key, size_t len)
 {
 {
-	ce_assert(key != NULL, "Key must be != NULL");
+	CE_ASSERT(key != NULL, "Key must be != NULL");
 
 
 	// FNV-1a
 	// FNV-1a
 	uint32_t hash = FNV1A_OFFSET_BASIS_32;
 	uint32_t hash = FNV1A_OFFSET_BASIS_32;
@@ -132,7 +132,7 @@ inline uint32_t fnv1a_32(const void* key, size_t len)
 /// FNV-1a hash, 64 bit
 /// FNV-1a hash, 64 bit
 inline uint64_t fnv1a_64(const void* key, size_t len)
 inline uint64_t fnv1a_64(const void* key, size_t len)
 {
 {
-	ce_assert(key != NULL, "Key must be != NULL");
+	CE_ASSERT(key != NULL, "Key must be != NULL");
 
 
 	// FNV-1a
 	// FNV-1a
 	uint64_t hash = FNV1A_OFFSET_BASIS_64;
 	uint64_t hash = FNV1A_OFFSET_BASIS_64;

+ 13 - 13
src/core/strings/Path.h

@@ -56,7 +56,7 @@ inline void strip_trailing_separator(const char* path, char* ret, size_t len);
 /// (Thanks org.eclipse.core.runtime for the documentation ;D).
 /// (Thanks org.eclipse.core.runtime for the documentation ;D).
 inline bool is_valid_segment(const char* segment)
 inline bool is_valid_segment(const char* segment)
 {
 {
-	ce_assert(segment != NULL, "Segment must be != NULL");
+	CE_ASSERT(segment != NULL, "Segment must be != NULL");
 	
 	
 	size_t segment_len = string::strlen(segment);
 	size_t segment_len = string::strlen(segment);
 
 
@@ -146,8 +146,8 @@ inline bool is_valid_path(const char* path)
 /// The @path must be valid.
 /// The @path must be valid.
 inline void pathname(const char* path, char* str, size_t len)
 inline void pathname(const char* path, char* str, size_t len)
 {
 {
-	ce_assert(path != NULL, "Path must be != NULL");
-	ce_assert(str != NULL, "Str must be != NULL");
+	CE_ASSERT(path != NULL, "Path must be != NULL");
+	CE_ASSERT(str != NULL, "Str must be != NULL");
 
 
 	const char* last_separator = string::find_last(path, '/');
 	const char* last_separator = string::find_last(path, '/');
 
 
@@ -171,8 +171,8 @@ inline void pathname(const char* path, char* str, size_t len)
 /// The @path must be valid.
 /// The @path must be valid.
 inline void filename(const char* path, char* str, size_t len)
 inline void filename(const char* path, char* str, size_t len)
 {
 {
-	ce_assert(path != NULL, "Path must be != NULL");
-	ce_assert(str != NULL, "Str must be != NULL");
+	CE_ASSERT(path != NULL, "Path must be != NULL");
+	CE_ASSERT(str != NULL, "Str must be != NULL");
 
 
 	const char* last_separator = string::find_last(path, '/');
 	const char* last_separator = string::find_last(path, '/');
 	
 	
@@ -195,8 +195,8 @@ inline void filename(const char* path, char* str, size_t len)
 /// The @path must be valid.
 /// The @path must be valid.
 inline void basename(const char* path, char* str, size_t len)
 inline void basename(const char* path, char* str, size_t len)
 {
 {
-	ce_assert(path != NULL, "Path must be != NULL");
-	ce_assert(str != NULL, "Str must be != NULL");
+	CE_ASSERT(path != NULL, "Path must be != NULL");
+	CE_ASSERT(str != NULL, "Str must be != NULL");
 
 
 	const char* last_separator = string::find_last(path, '/');
 	const char* last_separator = string::find_last(path, '/');
 	const char* last_dot = string::find_last(path, '.');
 	const char* last_dot = string::find_last(path, '.');
@@ -227,8 +227,8 @@ inline void basename(const char* path, char* str, size_t len)
 /// The @path must be valid.
 /// The @path must be valid.
 inline void extension(const char* path, char* str, size_t len)
 inline void extension(const char* path, char* str, size_t len)
 {
 {
-	ce_assert(path != NULL, "Path must be != NULL");
-	ce_assert(str != NULL, "Str must be != NULL");
+	CE_ASSERT(path != NULL, "Path must be != NULL");
+	CE_ASSERT(str != NULL, "Str must be != NULL");
 	
 	
 	const char* last_dot = string::find_last(path, '.');
 	const char* last_dot = string::find_last(path, '.');
 	
 	
@@ -250,8 +250,8 @@ inline void extension(const char* path, char* str, size_t len)
 /// The @path must be valid.
 /// The @path must be valid.
 inline void filename_without_extension(const char* path, char* str, size_t len)
 inline void filename_without_extension(const char* path, char* str, size_t len)
 {
 {
-	ce_assert(path != NULL, "Path must be != NULL");
-	ce_assert(str != NULL, "Str must be != NULL");
+	CE_ASSERT(path != NULL, "Path must be != NULL");
+	CE_ASSERT(str != NULL, "Str must be != NULL");
 	
 	
 	const char* last_dot = string::find_last(path, '.');
 	const char* last_dot = string::find_last(path, '.');
 	
 	
@@ -279,8 +279,8 @@ inline void filename_without_extension(const char* path, char* str, size_t len)
 /// The @path must be valid.
 /// The @path must be valid.
 inline void strip_trailing_separator(const char* path, char* str, size_t len)
 inline void strip_trailing_separator(const char* path, char* str, size_t len)
 {
 {
-	ce_assert(path != NULL, "Path must be != NULL");
-	ce_assert(str != NULL, "Str must be != NULL");
+	CE_ASSERT(path != NULL, "Path must be != NULL");
+	CE_ASSERT(str != NULL, "Str must be != NULL");
 	
 	
 	size_t path_len = string::strlen(path);
 	size_t path_len = string::strlen(path);
 	
 	

+ 11 - 11
src/core/strings/String.h

@@ -142,9 +142,9 @@ void				substring(const char* begin, const char* end, char* out, size_t len);
 
 
 //inline void Remove(uint32_t start, uint32_t end)
 //inline void Remove(uint32_t start, uint32_t end)
 //{
 //{
-//	ce_assert(start <= mLength);
-//	ce_assert(end <= mLength);
-//	ce_assert(start <= end);
+//	CE_ASSERT(start <= mLength);
+//	CE_ASSERT(end <= mLength);
+//	CE_ASSERT(start <= end);
 //	uint32_t len = end - start;
 //	uint32_t len = end - start;
 //	char* tmp = new char[mLength - len + 1];
 //	char* tmp = new char[mLength - len + 1];
 
 
@@ -177,7 +177,7 @@ void				substring(const char* begin, const char* end, char* out, size_t len);
 ////! Replaces all the occurencies of the given Str with the new one
 ////! Replaces all the occurencies of the given Str with the new one
 //inline void Replace(const Str& toFind, const Str& toReplace)
 //inline void Replace(const Str& toFind, const Str& toReplace)
 //{
 //{
-//	ce_assert(toReplace.mLength > 0);
+//	CE_ASSERT(toReplace.mLength > 0);
 //	if (mLength < toReplace.mLength)
 //	if (mLength < toReplace.mLength)
 //		return;
 //		return;
 
 
@@ -357,7 +357,7 @@ inline char* strncat(char* dest, const char* src, size_t len)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline const char* begin(const char* str)
 inline const char* begin(const char* str)
 {
 {
-	ce_assert(str != NULL, "Str must be != NULL");
+	CE_ASSERT(str != NULL, "Str must be != NULL");
 	
 	
 	return str;
 	return str;
 }
 }
@@ -365,7 +365,7 @@ inline const char* begin(const char* str)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline const char* end(const char* str)
 inline const char* end(const char* str)
 {
 {
-	ce_assert(str != NULL, "Str must be != NULL");
+	CE_ASSERT(str != NULL, "Str must be != NULL");
 	
 	
 	return str + string::strlen(str) + 1;
 	return str + string::strlen(str) + 1;
 }
 }
@@ -373,7 +373,7 @@ inline const char* end(const char* str)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline const char* find_first(const char* str, char c)
 inline const char* find_first(const char* str, char c)
 {
 {
-	ce_assert(str != NULL, "Str must be != NULL");
+	CE_ASSERT(str != NULL, "Str must be != NULL");
 
 
 	const char* str_begin = string::begin(str);
 	const char* str_begin = string::begin(str);
 	
 	
@@ -393,7 +393,7 @@ inline const char* find_first(const char* str, char c)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline const char* find_last(const char* str, char c)
 inline const char* find_last(const char* str, char c)
 {
 {
-	ce_assert(str != NULL, "Str must be != NULL");
+	CE_ASSERT(str != NULL, "Str must be != NULL");
 	
 	
 	const char* str_end = string::end(str) - 1;
 	const char* str_end = string::end(str) - 1;
 	
 	
@@ -413,9 +413,9 @@ inline const char* find_last(const char* str, char c)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline void substring(const char* begin, const char* end, char* out, size_t len)
 inline void substring(const char* begin, const char* end, char* out, size_t len)
 {
 {
-	ce_assert(begin != NULL, "Begin must be != NULL");
-	ce_assert(end != NULL, "End must be != NULL");
-	ce_assert(out != NULL, "Out must be != NULL");
+	CE_ASSERT(begin != NULL, "Begin must be != NULL");
+	CE_ASSERT(end != NULL, "End must be != NULL");
+	CE_ASSERT(out != NULL, "Out must be != NULL");
 	
 	
 	size_t i = 0;
 	size_t i = 0;
 	
 	

+ 4 - 4
src/input/EventDispatcher.cpp

@@ -47,7 +47,7 @@ EventDispatcher::~EventDispatcher()
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void EventDispatcher::add_mouse_listener(MouseListener* listener)
 void EventDispatcher::add_mouse_listener(MouseListener* listener)
 {
 {
-	ce_assert(listener != NULL, "Listener must be != NULL");
+	CE_ASSERT(listener != NULL, "Listener must be != NULL");
 
 
 	m_mouse_listener_list.push_back(listener);
 	m_mouse_listener_list.push_back(listener);
 }
 }
@@ -55,7 +55,7 @@ void EventDispatcher::add_mouse_listener(MouseListener* listener)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void EventDispatcher::add_keyboard_listener(KeyboardListener* listener)
 void EventDispatcher::add_keyboard_listener(KeyboardListener* listener)
 {
 {
-	ce_assert(listener != NULL, "Listener must be != NULL");
+	CE_ASSERT(listener != NULL, "Listener must be != NULL");
 
 
 	m_keyboard_listener_list.push_back(listener);
 	m_keyboard_listener_list.push_back(listener);
 }
 }
@@ -63,14 +63,14 @@ void EventDispatcher::add_keyboard_listener(KeyboardListener* listener)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void EventDispatcher::add_touch_listener(TouchListener* listener)
 void EventDispatcher::add_touch_listener(TouchListener* listener)
 {
 {
-	ce_assert(listener != NULL, "Listener must be != NULL");
+	CE_ASSERT(listener != NULL, "Listener must be != NULL");
 
 
 	m_touch_listener_list.push_back(listener);
 	m_touch_listener_list.push_back(listener);
 }
 }
 
 
 void EventDispatcher::add_accelerometer_listener(AccelerometerListener* listener)
 void EventDispatcher::add_accelerometer_listener(AccelerometerListener* listener)
 {
 {
-	ce_assert(listener != NULL, "Listener must be != NULL");
+	CE_ASSERT(listener != NULL, "Listener must be != NULL");
 	m_acc_listener_list.push_back(listener);
 	m_acc_listener_list.push_back(listener);
 }
 }
 
 

+ 6 - 6
src/os/android/File.cpp

@@ -42,7 +42,7 @@ File::File(const char* path, StreamOpenMode mode) :
 	m_mode = SOM_READ;
 	m_mode = SOM_READ;
 	m_asset = AAssetManager_open(os::get_android_asset_manager(), path, AASSET_MODE_RANDOM);
 	m_asset = AAssetManager_open(os::get_android_asset_manager(), path, AASSET_MODE_RANDOM);
 
 
-	ce_assert(m_asset != NULL, "Unable to open file: %s", path)
+	CE_ASSERT(m_asset != NULL, "Unable to open file: %s", path)
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
@@ -82,7 +82,7 @@ size_t File::size() const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 size_t File::read(void* data, size_t size)
 size_t File::read(void* data, size_t size)
 {
 {
-	ce_assert(data != NULL, "Data must be != NULL");
+	CE_ASSERT(data != NULL, "Data must be != NULL");
 
 
 	return (size_t)AAsset_read(m_asset, data, size);
 	return (size_t)AAsset_read(m_asset, data, size);
 }
 }
@@ -90,7 +90,7 @@ size_t File::read(void* data, size_t size)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 size_t File::write(const void* data, size_t size)
 size_t File::write(const void* data, size_t size)
 {
 {
-	ce_assert(data != NULL, "Data must be != NULL");
+	CE_ASSERT(data != NULL, "Data must be != NULL");
 
 
 	os::printf("Android asset directory is read-only!");
 	os::printf("Android asset directory is read-only!");
 
 
@@ -101,21 +101,21 @@ size_t File::write(const void* data, size_t size)
 void File::seek(size_t position)
 void File::seek(size_t position)
 {
 {
 	off_t seek_result = AAsset_seek(m_asset, (off_t)position, SEEK_SET);
 	off_t seek_result = AAsset_seek(m_asset, (off_t)position, SEEK_SET);
-	ce_assert(seek_result != (off_t) -1, "Failed to seek");
+	CE_ASSERT(seek_result != (off_t) -1, "Failed to seek");
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void File::seek_to_end()
 void File::seek_to_end()
 {
 {
 	off_t seek_result = AAsset_seek(m_asset, 0, SEEK_END);
 	off_t seek_result = AAsset_seek(m_asset, 0, SEEK_END);
-	ce_assert(seek_result != (off_t) -1, "Failed to seek");
+	CE_ASSERT(seek_result != (off_t) -1, "Failed to seek");
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void File::skip(size_t bytes)
 void File::skip(size_t bytes)
 {
 {
 	off_t seek_result = AAsset_seek(m_asset, (off_t) bytes, SEEK_CUR);
 	off_t seek_result = AAsset_seek(m_asset, (off_t) bytes, SEEK_CUR);
-	ce_assert(seek_result != (off_t) -1, "Failed to seek");
+	CE_ASSERT(seek_result != (off_t) -1, "Failed to seek");
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 1 - 1
src/os/linux/GLXRenderWindow.cpp

@@ -51,7 +51,7 @@ bool create_render_window(uint32_t x, uint32_t y, uint32_t width, uint32_t heigh
 {
 {
 	(void)fullscreen;
 	(void)fullscreen;
 
 
-	ce_assert(width != 0 && height != 0, "Width and height must be != 0");
+	CE_ASSERT(width != 0 && height != 0, "Width and height must be != 0");
 
 
 	display = XOpenDisplay(NULL);
 	display = XOpenDisplay(NULL);
 
 

+ 3 - 3
src/os/linux/LinuxOS.cpp

@@ -95,7 +95,7 @@ void log_info(const char* string, va_list arg)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 bool is_root_path(const char* path)
 bool is_root_path(const char* path)
 {
 {
-	ce_assert(path != NULL, "Path must be != NULL");
+	CE_ASSERT(path != NULL, "Path must be != NULL");
 
 
 	if (string::strlen(path) == 1)
 	if (string::strlen(path) == 1)
 	{
 	{
@@ -111,7 +111,7 @@ bool is_root_path(const char* path)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 bool is_absolute_path(const char* path)
 bool is_absolute_path(const char* path)
 {
 {
-	ce_assert(path != NULL, "Path must be != NULL");
+	CE_ASSERT(path != NULL, "Path must be != NULL");
 
 
 	if (string::strlen(path) > 0)
 	if (string::strlen(path) > 0)
 	{
 	{
@@ -280,7 +280,7 @@ void* open_library(const char* path)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void close_library(void* library)
 void close_library(void* library)
 {
 {
-	ce_assert(dlclose(library) == 0, "Failed to close library");
+	CE_ASSERT(dlclose(library) == 0, "Failed to close library");
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 8 - 8
src/os/posix/File.cpp

@@ -37,7 +37,7 @@ File::File(const char* path, StreamOpenMode mode) :
 	m_file_handle(NULL)
 	m_file_handle(NULL)
 {
 {
 	m_file_handle = fopen(path, (mode == SOM_READ) ? "rb" : "wb");
 	m_file_handle = fopen(path, (mode == SOM_READ) ? "rb" : "wb");
-	ce_assert(m_file_handle != NULL, "Unable to open file: %s", path);
+	CE_ASSERT(m_file_handle != NULL, "Unable to open file: %s", path);
 
 
 	m_mode = mode;
 	m_mode = mode;
 }
 }
@@ -76,12 +76,12 @@ size_t File::size() const
 	size_t pos = position();
 	size_t pos = position();
 
 
 	int fseek_result = fseek(m_file_handle, 0, SEEK_END);
 	int fseek_result = fseek(m_file_handle, 0, SEEK_END);
-	ce_assert(fseek_result == 0, "Failed to seek");
+	CE_ASSERT(fseek_result == 0, "Failed to seek");
 
 
 	size_t size = position();
 	size_t size = position();
 
 
 	fseek_result = fseek(m_file_handle, (long) pos, SEEK_SET);
 	fseek_result = fseek(m_file_handle, (long) pos, SEEK_SET);
-	ce_assert(fseek_result == 0, "Failed to seek");
+	CE_ASSERT(fseek_result == 0, "Failed to seek");
 
 
 	return size;
 	return size;
 }
 }
@@ -89,7 +89,7 @@ size_t File::size() const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 size_t File::read(void* data, size_t size)
 size_t File::read(void* data, size_t size)
 {
 {
-	ce_assert(data != NULL, "Data must be != NULL");
+	CE_ASSERT(data != NULL, "Data must be != NULL");
 
 
 	return fread(data, 1, size, m_file_handle);
 	return fread(data, 1, size, m_file_handle);
 }
 }
@@ -97,7 +97,7 @@ size_t File::read(void* data, size_t size)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 size_t File::write(const void* data, size_t size)
 size_t File::write(const void* data, size_t size)
 {
 {
-	ce_assert(data != NULL, "Data must be != NULL");
+	CE_ASSERT(data != NULL, "Data must be != NULL");
 
 
 	return fwrite(data, 1, size, m_file_handle);
 	return fwrite(data, 1, size, m_file_handle);
 }
 }
@@ -106,21 +106,21 @@ size_t File::write(const void* data, size_t size)
 void File::seek(size_t position)
 void File::seek(size_t position)
 {
 {
 	int fseek_result = fseek(m_file_handle, (long) position, SEEK_SET);
 	int fseek_result = fseek(m_file_handle, (long) position, SEEK_SET);
-	ce_assert(fseek_result == 0, "Failed to seek");
+	CE_ASSERT(fseek_result == 0, "Failed to seek");
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void File::seek_to_end()
 void File::seek_to_end()
 {
 {
 	int fseek_result = fseek(m_file_handle, 0, SEEK_END);
 	int fseek_result = fseek(m_file_handle, 0, SEEK_END);
-	ce_assert(fseek_result == 0, "Failed to seek");
+	CE_ASSERT(fseek_result == 0, "Failed to seek");
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void File::skip(size_t bytes)
 void File::skip(size_t bytes)
 {
 {
 	int fseek_result = fseek(m_file_handle, bytes, SEEK_CUR);
 	int fseek_result = fseek(m_file_handle, bytes, SEEK_CUR);
-	ce_assert(fseek_result == 0, "Failed to seek");
+	CE_ASSERT(fseek_result == 0, "Failed to seek");
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------

+ 2 - 2
src/os/posix/TCPSocket.cpp

@@ -153,7 +153,7 @@ void TCPSocket::close()
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 bool TCPSocket::send(const void* data, size_t size)
 bool TCPSocket::send(const void* data, size_t size)
 {
 {
-	ce_assert(data != NULL, "Data must be != NULL");
+	CE_ASSERT(data != NULL, "Data must be != NULL");
 
 
 	if (m_active_socket <= 0)
 	if (m_active_socket <= 0)
 	{
 	{
@@ -176,7 +176,7 @@ bool TCPSocket::send(const void* data, size_t size)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 size_t TCPSocket::receive(void* data, size_t size)
 size_t TCPSocket::receive(void* data, size_t size)
 {
 {
-	ce_assert(data != NULL, "Data must be != NULL");
+	CE_ASSERT(data != NULL, "Data must be != NULL");
 
 
 	if (m_active_socket <= 0)
 	if (m_active_socket <= 0)
 	{
 	{

+ 3 - 3
src/os/posix/UDPSocket.cpp

@@ -55,7 +55,7 @@ UDPSocket::~UDPSocket()
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 bool UDPSocket::open(uint16_t port)
 bool UDPSocket::open(uint16_t port)
 {
 {
-	ce_assert(!is_open(), "Socket is already open");
+	CE_ASSERT(!is_open(), "Socket is already open");
 
 
 	m_socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
 	m_socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
 
 
@@ -97,7 +97,7 @@ bool UDPSocket::open(uint16_t port)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 bool UDPSocket::send(const NetAddress &receiver, const void* data, size_t size)
 bool UDPSocket::send(const NetAddress &receiver, const void* data, size_t size)
 {
 {
-	ce_assert(data != NULL, "Data must be != NULL");
+	CE_ASSERT(data != NULL, "Data must be != NULL");
 
 
 	sockaddr_in address;
 	sockaddr_in address;
 	address.sin_family = AF_INET;
 	address.sin_family = AF_INET;
@@ -117,7 +117,7 @@ bool UDPSocket::send(const NetAddress &receiver, const void* data, size_t size)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 size_t UDPSocket::receive(NetAddress& sender, void* data, size_t size)
 size_t UDPSocket::receive(NetAddress& sender, void* data, size_t size)
 {
 {
-	ce_assert(data != NULL, "Data must be != NULL");
+	CE_ASSERT(data != NULL, "Data must be != NULL");
 
 
 	sockaddr_in from;
 	sockaddr_in from;
 	socklen_t from_length = sizeof(from);
 	socklen_t from_length = sizeof(from);

+ 4 - 4
src/os/win/WinTCPSocket.cpp

@@ -109,8 +109,8 @@ int32_t	TCPSocket::close()
 
 
 bool TCPSocket::send(const void* data, int32_t size)
 bool TCPSocket::send(const void* data, int32_t size)
 {
 {
-	ce_assert(data);
-	ce_assert(size > 0);
+	CE_ASSERT(data);
+	CE_ASSERT(size > 0);
 
 
 	int32_t sd = get_active_socket_id();
 	int32_t sd = get_active_socket_id();
 	if (sd <= 0)
 	if (sd <= 0)
@@ -132,8 +132,8 @@ bool TCPSocket::send(const void* data, int32_t size)
 
 
 int32_t	TCPSocket::receive(void* data, int32_t size)
 int32_t	TCPSocket::receive(void* data, int32_t size)
 {
 {
-	ce_assert(data);
-	ce_assert(size > 0);
+	CE_ASSERT(data);
+	CE_ASSERT(size > 0);
 
 
 	int32_t sd = get_active_socket_id();
 	int32_t sd = get_active_socket_id();
 
 

+ 7 - 7
src/os/win/WinUDPSocket.cpp

@@ -22,7 +22,7 @@ UDPSocket::~UDPSocket()
 
 
 bool UDPSocket::open(uint16_t port)
 bool UDPSocket::open(uint16_t port)
 {
 {
-	ce_assert(!is_open());
+	CE_ASSERT(!is_open());
 
 
 	m_socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
 	m_socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
 	if (m_socket <= 0)
 	if (m_socket <= 0)
@@ -59,16 +59,16 @@ bool UDPSocket::open(uint16_t port)
 
 
 bool UDPSocket::send(IPv4Address &receiver, const void* data, int32_t size )
 bool UDPSocket::send(IPv4Address &receiver, const void* data, int32_t size )
 {
 {
-	ce_assert(data);
-	ce_assert(size > 0);
+	CE_ASSERT(data);
+	CE_ASSERT(size > 0);
 
 
 	if (m_socket == 0)
 	if (m_socket == 0)
 	{
 	{
 		return false;
 		return false;
 	}
 	}
 	
 	
-	ce_assert(receiver.get_address() != 0);
-	ce_assert(receiver.get_port() != 0);
+	CE_ASSERT(receiver.get_address() != 0);
+	CE_ASSERT(receiver.get_port() != 0);
 
 
 	sockaddr_in address;
 	sockaddr_in address;
 	address.sin_family = AF_INET;
 	address.sin_family = AF_INET;
@@ -82,8 +82,8 @@ bool UDPSocket::send(IPv4Address &receiver, const void* data, int32_t size )
 
 
 int32_t UDPSocket::receive(IPv4Address &sender, void* data, int32_t size)
 int32_t UDPSocket::receive(IPv4Address &sender, void* data, int32_t size)
 {
 {
-	ce_assert(data);
-	ce_assert(size > 0);
+	CE_ASSERT(data);
+	CE_ASSERT(size > 0);
 
 
 	if (m_socket == 0)
 	if (m_socket == 0)
 	{
 	{

+ 11 - 11
src/renderers/gl/GLRenderer.cpp

@@ -95,7 +95,7 @@ GLRenderer::GLRenderer() :
 		m_matrix[i].load_identity();
 		m_matrix[i].load_identity();
 	}
 	}
 
 
-	ce_assert(glewInit() == GLEW_OK, "Failed to initialize GLEW");
+	CE_ASSERT(glewInit() == GLEW_OK, "Failed to initialize GLEW");
 
 
 	Log::i("GLEW initialized.");
 	Log::i("GLEW initialized.");
 
 
@@ -224,7 +224,7 @@ VertexBufferId GLRenderer::create_dynamic_vertex_buffer(size_t count, VertexForm
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void GLRenderer::update_vertex_buffer(VertexBufferId id, size_t offset, size_t count, const void* vertices)
 void GLRenderer::update_vertex_buffer(VertexBufferId id, size_t offset, size_t count, const void* vertices)
 {
 {
-	ce_assert(m_vertex_buffers_id_table.has(id), "Vertex buffer does not exist");
+	CE_ASSERT(m_vertex_buffers_id_table.has(id), "Vertex buffer does not exist");
 
 
 	GLVertexBuffer& buffer = m_vertex_buffers[id.index];
 	GLVertexBuffer& buffer = m_vertex_buffers[id.index];
 
 
@@ -236,7 +236,7 @@ void GLRenderer::update_vertex_buffer(VertexBufferId id, size_t offset, size_t c
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void GLRenderer::destroy_vertex_buffer(VertexBufferId id)
 void GLRenderer::destroy_vertex_buffer(VertexBufferId id)
 {
 {
-	ce_assert(m_vertex_buffers_id_table.has(id), "Vertex buffer does not exist");
+	CE_ASSERT(m_vertex_buffers_id_table.has(id), "Vertex buffer does not exist");
 
 
 	GLVertexBuffer& buffer = m_vertex_buffers[id.index];
 	GLVertexBuffer& buffer = m_vertex_buffers[id.index];
 
 
@@ -265,7 +265,7 @@ IndexBufferId GLRenderer::create_index_buffer(size_t count, const void* indices)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void GLRenderer::destroy_index_buffer(IndexBufferId id)
 void GLRenderer::destroy_index_buffer(IndexBufferId id)
 {
 {
-	ce_assert(m_index_buffers_id_table.has(id), "Index buffer does not exist");
+	CE_ASSERT(m_index_buffers_id_table.has(id), "Index buffer does not exist");
 
 
 	GLIndexBuffer& buffer = m_index_buffers[id.index];
 	GLIndexBuffer& buffer = m_index_buffers[id.index];
 
 
@@ -299,7 +299,7 @@ TextureId GLRenderer::create_texture(uint32_t width, uint32_t height, PixelForma
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void GLRenderer::update_texture(TextureId id, uint32_t x, uint32_t y, uint32_t width, uint32_t height, const void* data)
 void GLRenderer::update_texture(TextureId id, uint32_t x, uint32_t y, uint32_t width, uint32_t height, const void* data)
 {
 {
-	ce_assert(m_textures_id_table.has(id), "Texture does not exist");
+	CE_ASSERT(m_textures_id_table.has(id), "Texture does not exist");
 
 
 	GLTexture& gl_texture = m_textures[id.index];
 	GLTexture& gl_texture = m_textures[id.index];
 
 
@@ -312,7 +312,7 @@ void GLRenderer::update_texture(TextureId id, uint32_t x, uint32_t y, uint32_t w
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void GLRenderer::destroy_texture(TextureId id)
 void GLRenderer::destroy_texture(TextureId id)
 {
 {
-	ce_assert(m_textures_id_table.has(id), "Texture does not exist");
+	CE_ASSERT(m_textures_id_table.has(id), "Texture does not exist");
 
 
 	GLTexture& gl_texture = m_textures[id.index];
 	GLTexture& gl_texture = m_textures[id.index];
 
 
@@ -397,7 +397,7 @@ void GLRenderer::set_lighting(bool lighting)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void GLRenderer::bind_texture(uint32_t unit, TextureId texture)
 void GLRenderer::bind_texture(uint32_t unit, TextureId texture)
 {
 {
-	ce_assert(m_textures_id_table.has(texture), "Texture does not exist");
+	CE_ASSERT(m_textures_id_table.has(texture), "Texture does not exist");
 
 
 	if (!activate_texture_unit(unit))
 	if (!activate_texture_unit(unit))
 	{
 	{
@@ -790,7 +790,7 @@ void GLRenderer::set_matrix(MatrixType type, const Mat4& matrix)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void GLRenderer::bind_vertex_buffer(VertexBufferId vb) const
 void GLRenderer::bind_vertex_buffer(VertexBufferId vb) const
 {
 {
-	ce_assert(m_vertex_buffers_id_table.has(vb), "Vertex buffer does not exist");
+	CE_ASSERT(m_vertex_buffers_id_table.has(vb), "Vertex buffer does not exist");
 
 
 	const GLVertexBuffer& vertex_buffer = m_vertex_buffers[vb.index];
 	const GLVertexBuffer& vertex_buffer = m_vertex_buffers[vb.index];
 
 
@@ -840,7 +840,7 @@ void GLRenderer::bind_vertex_buffer(VertexBufferId vb) const
 		}
 		}
 		default:
 		default:
 		{
 		{
-			ce_assert(0, "Vertex format unknown");
+			CE_ASSERT(0, "Vertex format unknown");
 			break;
 			break;
 		}
 		}
 	}
 	}
@@ -849,7 +849,7 @@ void GLRenderer::bind_vertex_buffer(VertexBufferId vb) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void GLRenderer::draw_triangles(IndexBufferId id) const
 void GLRenderer::draw_triangles(IndexBufferId id) const
 {
 {
-	ce_assert(m_index_buffers_id_table.has(id), "Index buffer does not exist");
+	CE_ASSERT(m_index_buffers_id_table.has(id), "Index buffer does not exist");
 
 
 	const GLIndexBuffer& index_buffer = m_index_buffers[id.index];
 	const GLIndexBuffer& index_buffer = m_index_buffers[id.index];
 
 
@@ -861,7 +861,7 @@ void GLRenderer::draw_triangles(IndexBufferId id) const
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 // void GLRenderer::bind_render_buffer(RenderBufferId id) const
 // void GLRenderer::bind_render_buffer(RenderBufferId id) const
 // {
 // {
-// 	ce_assert(m_render_buffers_id_table.has(id), "Render buffer does not exist");
+// 	CE_ASSERT(m_render_buffers_id_table.has(id), "Render buffer does not exist");
 
 
 // 	const GLRenderBuffer& render_buffer = m_render_buffers[id.index];
 // 	const GLRenderBuffer& render_buffer = m_render_buffers[id.index];
 // }
 // }

+ 2 - 2
src/renderers/gles/GLESRenderer.cpp

@@ -567,8 +567,8 @@ void GLESRenderer::set_matrix(MatrixType type, const Mat4& matrix)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void GLESRenderer::draw_vertex_index_buffer(const VertexBuffer* vertices, const IndexBuffer* indices)
 void GLESRenderer::draw_vertex_index_buffer(const VertexBuffer* vertices, const IndexBuffer* indices)
 {
 {
-	ce_assert(vertices != NULL);
-	ce_assert(indices != NULL);
+	CE_ASSERT(vertices != NULL);
+	CE_ASSERT(indices != NULL);
 
 
 	glEnableClientState(GL_VERTEX_ARRAY);
 	glEnableClientState(GL_VERTEX_ARRAY);
 	glEnableClientState(GL_NORMAL_ARRAY);
 	glEnableClientState(GL_NORMAL_ARRAY);

+ 6 - 6
src/renderers/gles/GLESUtils.h

@@ -65,7 +65,7 @@ private:
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline GLenum GLES::compare_function(CompareFunction function)
 inline GLenum GLES::compare_function(CompareFunction function)
 {
 {
-	ce_assert(function < CF_COUNT);
+	CE_ASSERT(function < CF_COUNT);
 
 
 	return COMPARE_FUNCTION_TABLE[function];
 	return COMPARE_FUNCTION_TABLE[function];
 }
 }
@@ -73,7 +73,7 @@ inline GLenum GLES::compare_function(CompareFunction function)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline GLenum GLES::blend_function(BlendFunction function)
 inline GLenum GLES::blend_function(BlendFunction function)
 {
 {
-	ce_assert(function < BF_COUNT);
+	CE_ASSERT(function < BF_COUNT);
 
 
 	return BLEND_FUNCTION_TABLE[function];
 	return BLEND_FUNCTION_TABLE[function];
 }
 }
@@ -81,7 +81,7 @@ inline GLenum GLES::blend_function(BlendFunction function)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline GLenum GLES::texture_mode(TextureMode mode)
 inline GLenum GLES::texture_mode(TextureMode mode)
 {
 {
-	ce_assert(mode < TM_COUNT);
+	CE_ASSERT(mode < TM_COUNT);
 
 
 	return TEXTURE_MODE_TABLE[mode];
 	return TEXTURE_MODE_TABLE[mode];
 }
 }
@@ -89,7 +89,7 @@ inline GLenum GLES::texture_mode(TextureMode mode)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline GLenum GLES::texture_wrap(TextureWrap wrap)
 inline GLenum GLES::texture_wrap(TextureWrap wrap)
 {
 {
-	ce_assert(wrap < TW_COUNT);
+	CE_ASSERT(wrap < TW_COUNT);
 
 
 	return TEXTURE_WRAP_TABLE[wrap];
 	return TEXTURE_WRAP_TABLE[wrap];
 }
 }
@@ -97,7 +97,7 @@ inline GLenum GLES::texture_wrap(TextureWrap wrap)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline void GLES::texture_filter(TextureFilter filter, GLint& minFilter, GLint& magFilter)
 inline void GLES::texture_filter(TextureFilter filter, GLint& minFilter, GLint& magFilter)
 {
 {
-	ce_assert(filter < TF_COUNT);
+	CE_ASSERT(filter < TF_COUNT);
 
 
 	minFilter = TEXTURE_MIN_FILTER_TABLE[filter];
 	minFilter = TEXTURE_MIN_FILTER_TABLE[filter];
 	magFilter = TEXTURE_MAG_FILTER_TABLE[filter];
 	magFilter = TEXTURE_MAG_FILTER_TABLE[filter];
@@ -106,7 +106,7 @@ inline void GLES::texture_filter(TextureFilter filter, GLint& minFilter, GLint&
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 inline GLenum GLES::fog_mode(FogMode mode)
 inline GLenum GLES::fog_mode(FogMode mode)
 {
 {
-	ce_assert(mode < FM_COUNT);
+	CE_ASSERT(mode < FM_COUNT);
 
 
 	return FOG_MODE_TABLE[mode];
 	return FOG_MODE_TABLE[mode];
 }
 }

+ 2 - 2
tests/allocators.cpp

@@ -10,13 +10,13 @@ int main()
 	MallocAllocator malloc_allocator;
 	MallocAllocator malloc_allocator;
 
 
 	char* char_buffer = (char*)malloc_allocator.allocate(128);
 	char* char_buffer = (char*)malloc_allocator.allocate(128);
-	ce_assert(malloc_allocator.allocated_size() >= 128, "Allocated size differs from requested size");
+	CE_ASSERT(malloc_allocator.allocated_size() >= 128, "Allocated size differs from requested size");
 
 
 	printf("MallocAllocator::get_allocated_size(): %d\n", malloc_allocator.allocated_size());
 	printf("MallocAllocator::get_allocated_size(): %d\n", malloc_allocator.allocated_size());
 
 
 	malloc_allocator.deallocate(char_buffer);
 	malloc_allocator.deallocate(char_buffer);
 
 
 	printf("MallocAllocator::get_allocated_size(): %d\n", malloc_allocator.allocated_size());
 	printf("MallocAllocator::get_allocated_size(): %d\n", malloc_allocator.allocated_size());
-	//ce_assert(malloc_allocator.get_allocated_size() == 0);
+	//CE_ASSERT(malloc_allocator.get_allocated_size() == 0);
 }
 }
 
 

+ 8 - 8
tests/containers.cpp

@@ -10,7 +10,7 @@ int main()
 
 
 	List<int> int_list(allocator);
 	List<int> int_list(allocator);
 
 
-	ce_assert(int_list.size() == 0, "Size differs from expected value");
+	CE_ASSERT(int_list.size() == 0, "Size differs from expected value");
 
 
 	int_list.push_back(10);
 	int_list.push_back(10);
 	int_list.push_back(20);
 	int_list.push_back(20);
@@ -19,19 +19,19 @@ int main()
 	int_list.push_back(50);
 	int_list.push_back(50);
 	int_list.push_back(60);
 	int_list.push_back(60);
 
 
-	ce_assert(int_list.size() == 6, "Size differs from expected value");
-	ce_assert(int_list.front() == 10, "Front differs from expected value");
-	ce_assert(int_list.back() == 60, "Back differs from expected value");
+	CE_ASSERT(int_list.size() == 6, "Size differs from expected value");
+	CE_ASSERT(int_list.front() == 10, "Front differs from expected value");
+	CE_ASSERT(int_list.back() == 60, "Back differs from expected value");
 
 
 	int_list.pop_back();
 	int_list.pop_back();
 
 
-	ce_assert(int_list.size() == 5, "Size differs from expected value");
-	ce_assert(int_list.front() == 10, "Front differs from expected value");
-	ce_assert(int_list.back() == 50, "Back differs from expected value");
+	CE_ASSERT(int_list.size() == 5, "Size differs from expected value");
+	CE_ASSERT(int_list.front() == 10, "Front differs from expected value");
+	CE_ASSERT(int_list.back() == 50, "Back differs from expected value");
 
 
 	int_list.clear();
 	int_list.clear();
 
 
-	ce_assert(int_list.size() == 0, "Size differs from expected value");
+	CE_ASSERT(int_list.size() == 0, "Size differs from expected value");
 
 
 	return 0;
 	return 0;
 }
 }

+ 32 - 32
tests/paths.cpp

@@ -10,99 +10,99 @@ int main()
 	char path_output[128];
 	char path_output[128];
 	
 	
 	// Test is_valid_segment
 	// Test is_valid_segment
-	ce_assert(path::is_valid_segment(".") == false);
+	CE_ASSERT(path::is_valid_segment(".") == false);
 	
 	
-	ce_assert(path::is_valid_segment("/") == false);
+	CE_ASSERT(path::is_valid_segment("/") == false);
 	
 	
-	ce_assert(path::is_valid_segment("\\") == false);
+	CE_ASSERT(path::is_valid_segment("\\") == false);
 
 
-	ce_assert(path::is_valid_segment(":") == false);
+	CE_ASSERT(path::is_valid_segment(":") == false);
 	
 	
-	ce_assert(path::is_valid_segment("tga/") == false);
+	CE_ASSERT(path::is_valid_segment("tga/") == false);
 	
 	
-	ce_assert(path::is_valid_segment("tga\\foo") == false);
+	CE_ASSERT(path::is_valid_segment("tga\\foo") == false);
 	
 	
-	ce_assert(path::is_valid_segment("tga") == true);
+	CE_ASSERT(path::is_valid_segment("tga") == true);
 	
 	
-	ce_assert(path::is_valid_segment("back_texture") == true);
+	CE_ASSERT(path::is_valid_segment("back_texture") == true);
 	
 	
 	// Test pathname
 	// Test pathname
 	path::pathname("/home/project/texture.tga", path_output, 128);
 	path::pathname("/home/project/texture.tga", path_output, 128);
-	ce_assert(string::strcmp("/home/project", path_output) == 0);
+	CE_ASSERT(string::strcmp("/home/project", path_output) == 0);
 
 
 	path::pathname("/home/project", path_output, 128);
 	path::pathname("/home/project", path_output, 128);
-	ce_assert(string::strcmp("/home", path_output) == 0);
+	CE_ASSERT(string::strcmp("/home", path_output) == 0);
 	
 	
 	path::pathname("/home", path_output, 128);
 	path::pathname("/home", path_output, 128);
-	ce_assert(string::strcmp("", path_output) == 0);
+	CE_ASSERT(string::strcmp("", path_output) == 0);
 	
 	
 	path::pathname("/", path_output, 128);
 	path::pathname("/", path_output, 128);
-	ce_assert(string::strcmp("", path_output) == 0);
+	CE_ASSERT(string::strcmp("", path_output) == 0);
 	
 	
 	path::pathname("", path_output, 128);
 	path::pathname("", path_output, 128);
-	ce_assert(string::strcmp("", path_output) == 0);
+	CE_ASSERT(string::strcmp("", path_output) == 0);
 	
 	
 	// Test filename
 	// Test filename
 	path::filename("/home/project/texture.tga", path_output, 128);
 	path::filename("/home/project/texture.tga", path_output, 128);
-	ce_assert(string::strcmp("texture.tga", path_output) == 0);
+	CE_ASSERT(string::strcmp("texture.tga", path_output) == 0);
 	
 	
 	path::filename("/home/project/texture", path_output, 128);
 	path::filename("/home/project/texture", path_output, 128);
-	ce_assert(string::strcmp("texture", path_output) == 0);
+	CE_ASSERT(string::strcmp("texture", path_output) == 0);
 	
 	
 	path::filename("/home", path_output, 128);
 	path::filename("/home", path_output, 128);
-	ce_assert(string::strcmp("home", path_output) == 0);
+	CE_ASSERT(string::strcmp("home", path_output) == 0);
 	
 	
 	path::filename("/", path_output, 128);
 	path::filename("/", path_output, 128);
-	ce_assert(string::strcmp("", path_output) == 0);
+	CE_ASSERT(string::strcmp("", path_output) == 0);
 	
 	
 	path::filename("", path_output, 128);
 	path::filename("", path_output, 128);
-	ce_assert(string::strcmp("", path_output) == 0);
+	CE_ASSERT(string::strcmp("", path_output) == 0);
 
 
 	// Test basename
 	// Test basename
 	path::basename("/home/project/texture.tga", path_output, 128);
 	path::basename("/home/project/texture.tga", path_output, 128);
-	ce_assert(string::strcmp("texture", path_output) == 0);
+	CE_ASSERT(string::strcmp("texture", path_output) == 0);
 	
 	
 	path::basename("/home/project/textureabc", path_output, 128);
 	path::basename("/home/project/textureabc", path_output, 128);
 	printf(path_output);
 	printf(path_output);
-	ce_assert(string::strcmp("textureabc", path_output) == 0);
+	CE_ASSERT(string::strcmp("textureabc", path_output) == 0);
 	
 	
 	path::basename("/hom.e/proj./e.ct/textu.reabc", path_output, 128);
 	path::basename("/hom.e/proj./e.ct/textu.reabc", path_output, 128);
-	ce_assert(string::strcmp("textu", path_output) == 0);
+	CE_ASSERT(string::strcmp("textu", path_output) == 0);
 	
 	
 	path::basename("texture.tga", path_output, 128);
 	path::basename("texture.tga", path_output, 128);
-	ce_assert(string::strcmp("texture", path_output) == 0);
+	CE_ASSERT(string::strcmp("texture", path_output) == 0);
 	
 	
 	path::basename("/home", path_output, 128);
 	path::basename("/home", path_output, 128);
-	ce_assert(string::strcmp("home", path_output) == 0);
+	CE_ASSERT(string::strcmp("home", path_output) == 0);
 	
 	
 	path::basename("/", path_output, 128);
 	path::basename("/", path_output, 128);
-	ce_assert(string::strcmp("", path_output) == 0);
+	CE_ASSERT(string::strcmp("", path_output) == 0);
 	
 	
 	path::basename("", path_output, 128);
 	path::basename("", path_output, 128);
-	ce_assert(string::strcmp("", path_output) == 0);
+	CE_ASSERT(string::strcmp("", path_output) == 0);
 	
 	
 	// Test extension
 	// Test extension
 	path::extension("/home/project/texture.tga", path_output, 128);
 	path::extension("/home/project/texture.tga", path_output, 128);
-	ce_assert(string::strcmp("tga", path_output) == 0);
+	CE_ASSERT(string::strcmp("tga", path_output) == 0);
 	
 	
 	path::extension("/home/project/texture", path_output, 128);
 	path::extension("/home/project/texture", path_output, 128);
-	ce_assert(string::strcmp("", path_output) == 0);
+	CE_ASSERT(string::strcmp("", path_output) == 0);
 	
 	
 	path::extension("/home/project.x/texture.tga", path_output, 128);
 	path::extension("/home/project.x/texture.tga", path_output, 128);
-	ce_assert(string::strcmp("tga", path_output) == 0);
+	CE_ASSERT(string::strcmp("tga", path_output) == 0);
 	
 	
 	// Test filename_without_extension
 	// Test filename_without_extension
 	path::filename_without_extension("/home/project/texture.tga", path_output, 128);
 	path::filename_without_extension("/home/project/texture.tga", path_output, 128);
-	ce_assert(string::strcmp("/home/project/texture", path_output) == 0);
+	CE_ASSERT(string::strcmp("/home/project/texture", path_output) == 0);
 	
 	
 	// Test strip_trailing_separator
 	// Test strip_trailing_separator
 	path::strip_trailing_separator("/home/project/texture.tga", path_output, 128);
 	path::strip_trailing_separator("/home/project/texture.tga", path_output, 128);
-	ce_assert(string::strcmp("/home/project/texture.tga", path_output) == 0);
+	CE_ASSERT(string::strcmp("/home/project/texture.tga", path_output) == 0);
 	
 	
 	path::strip_trailing_separator("/home/project/texture2.tga/", path_output, 128);
 	path::strip_trailing_separator("/home/project/texture2.tga/", path_output, 128);
-	ce_assert(string::strcmp("/home/project/texture2.tga", path_output) == 0);
+	CE_ASSERT(string::strcmp("/home/project/texture2.tga", path_output) == 0);
 	
 	
 	path::strip_trailing_separator("texture.tga", path_output, 128);
 	path::strip_trailing_separator("texture.tga", path_output, 128);
-	ce_assert(string::strcmp("texture.tga", path_output) == 0);
+	CE_ASSERT(string::strcmp("texture.tga", path_output) == 0);
 }
 }
 
 

+ 12 - 12
tests/strings.cpp

@@ -10,40 +10,40 @@ const char* path_string = "/home/project/texture.tga";
 int main()
 int main()
 {
 {
 	// Test strlen
 	// Test strlen
-	ce_assert(string::strlen("ciao") == 4);
+	CE_ASSERT(string::strlen("ciao") == 4);
 	// FIXME add UTF-8 test case
 	// FIXME add UTF-8 test case
 
 
 	// Test begin/end
 	// Test begin/end
-	ce_assert(string::begin(hello_string) == &hello_string[0]);
+	CE_ASSERT(string::begin(hello_string) == &hello_string[0]);
 	
 	
-	ce_assert(string::end(hello_string) == &hello_string[24] + 2);
+	CE_ASSERT(string::end(hello_string) == &hello_string[24] + 2);
 	
 	
 	// Test find_first/find_last
 	// Test find_first/find_last
-	ce_assert(string::find_first(hello_string, '.') == &hello_string[2]);
+	CE_ASSERT(string::find_first(hello_string, '.') == &hello_string[2]);
 	
 	
-	ce_assert(string::find_last(hello_string, '.') == &hello_string[17]);
+	CE_ASSERT(string::find_last(hello_string, '.') == &hello_string[17]);
 	
 	
-	ce_assert(string::find_first(hello_string, '?') == string::end(hello_string));
+	CE_ASSERT(string::find_first(hello_string, '?') == string::end(hello_string));
 	
 	
-	ce_assert(string::find_last(hello_string, '?') == string::end(hello_string));
+	CE_ASSERT(string::find_last(hello_string, '?') == string::end(hello_string));
 	
 	
-	ce_assert(string::find_last(hello_string, '/') == &hello_string[22]);
+	CE_ASSERT(string::find_last(hello_string, '/') == &hello_string[22]);
 	
 	
-	ce_assert(string::find_last(path_string, '/') == &path_string[13]);
+	CE_ASSERT(string::find_last(path_string, '/') == &path_string[13]);
 	
 	
 	// Test substring
 	// Test substring
 	char string_buffer[64];
 	char string_buffer[64];
 	
 	
 	memset(string_buffer, 'a', 64);
 	memset(string_buffer, 'a', 64);
 	string::substring(string::begin(hello_string), string::end(hello_string), string_buffer, 64);
 	string::substring(string::begin(hello_string), string::end(hello_string), string_buffer, 64);
-	ce_assert(string::strcmp(hello_string, string_buffer) == 0);
+	CE_ASSERT(string::strcmp(hello_string, string_buffer) == 0);
 	
 	
 	memset(string_buffer, 'a', 64);
 	memset(string_buffer, 'a', 64);
 	string::substring(string::begin(hello_string), &hello_string[11], string_buffer, 64);
 	string::substring(string::begin(hello_string), &hello_string[11], string_buffer, 64);
-	ce_assert(string::strcmp(string_buffer, "/h.ello.eve") == 0);
+	CE_ASSERT(string::strcmp(string_buffer, "/h.ello.eve") == 0);
 	
 	
 	memset(string_buffer, 'a', 64);
 	memset(string_buffer, 'a', 64);
 	string::substring(string::begin(hello_string), string::end(hello_string), string_buffer, 5);
 	string::substring(string::begin(hello_string), string::end(hello_string), string_buffer, 5);
-	ce_assert(string::strcmp(string_buffer, "/h.el") == 0);
+	CE_ASSERT(string::strcmp(string_buffer, "/h.el") == 0);
 }
 }
 
 

+ 3 - 3
tools/editors/fontgen/fontgen.cpp

@@ -111,7 +111,7 @@ Image* BuildFontImage(const char* ttfFont, ushort ttfSize, ushort ttfResolution)
 
 
 	// Find the biggest character
 	// Find the biggest character
 	// For each range
 	// For each range
-	ce_assert(mCodePointRangeList.GetSize() % 2 == 0);
+	CE_ASSERT(mCodePointRangeList.GetSize() % 2 == 0);
 	for (int i = 0; i < mCodePointRangeList.GetSize(); i += 2)
 	for (int i = 0; i < mCodePointRangeList.GetSize(); i += 2)
 	{
 	{
 		uint j = mCodePointRangeList[i + 0];
 		uint j = mCodePointRangeList[i + 0];
@@ -174,7 +174,7 @@ Image* BuildFontImage(const char* ttfFont, ushort ttfSize, ushort ttfResolution)
 	FileStream fileStream(SOM_WRITE, Str(ttfFont) + Str(".txt"));
 	FileStream fileStream(SOM_WRITE, Str(ttfFont) + Str(".txt"));
 	TextWriter fileWriter(&fileStream);
 	TextWriter fileWriter(&fileStream);
 
 
-	ce_assert(mCodePointRangeList.GetSize() % 2 == 0);
+	CE_ASSERT(mCodePointRangeList.GetSize() % 2 == 0);
 	// For each range
 	// For each range
 	for (int i = 0; i < mCodePointRangeList.GetSize(); i += 2)
 	for (int i = 0; i < mCodePointRangeList.GetSize(); i += 2)
 	{
 	{
@@ -254,7 +254,7 @@ Image* BuildFontImage(const char* ttfFont, ushort ttfSize, ushort ttfResolution)
 
 
 void AddCodePointRange(uint min, uint max)
 void AddCodePointRange(uint min, uint max)
 {
 {
-	ce_assert(min <= max);
+	CE_ASSERT(min <= max);
 
 
 	mCodePointRangeList.Append(min);
 	mCodePointRangeList.Append(min);
 	mCodePointRangeList.Append(max);
 	mCodePointRangeList.Append(max);

+ 2 - 2
tools/editors/world-editor/terrain/Heightfield.cpp

@@ -162,8 +162,8 @@ void Heightfield::set_altitudes(float altitude)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 uint32_t Heightfield::coords_to_index(uint32_t x, uint32_t y) const
 uint32_t Heightfield::coords_to_index(uint32_t x, uint32_t y) const
 {
 {
-	ce_assert(x < m_width, "X coordinates beyond heightfield width");
-	ce_assert(y < m_height, "Y coordinates beyond heightfield height");
+	CE_ASSERT(x < m_width, "X coordinates beyond heightfield width");
+	CE_ASSERT(y < m_height, "Y coordinates beyond heightfield height");
 
 
 	return m_width * y + x;
 	return m_width * y + x;
 }
 }