ソースを参照

rename init_memory in memory::init

mikymod 12 年 前
コミット
a31d550526
3 ファイル変更10 行追加10 行削除
  1. 2 2
      engine/core/mem/Memory.cpp
  2. 2 2
      engine/core/mem/Memory.h
  3. 6 6
      engine/os/win/main.cpp

+ 2 - 2
engine/core/mem/Memory.cpp

@@ -63,12 +63,12 @@ namespace memory
 static char buffer[1024];
 static HeapAllocator* g_default_allocator = NULL;
 
-void init_memory()
+void init()
 {
 	g_default_allocator = new (buffer) HeapAllocator();
 }
 
-void shutdown_memory()
+void shutdown()
 {
 	g_default_allocator->~HeapAllocator();
 }

+ 2 - 2
engine/core/mem/Memory.h

@@ -40,12 +40,12 @@ const size_t	DEFAULT_ALIGN	= 4;			//!< Default memory alignment in bytes
 /// Constructs the initial default allocators.
 /// @note
 /// Has to be called before anything else during the engine startup.
-CE_EXPORT void init_memory();
+CE_EXPORT void init();
 
 /// Destroys the allocators created with memory::init().
 /// @note
 /// Should be the last call of the program.
-CE_EXPORT void shutdown_memory();
+CE_EXPORT void shutdown();
 
 /// Returns the pointer @a p aligned to the desired @a align byte
 inline void* align_top(void* p, size_t align)

+ 6 - 6
engine/os/win/main.cpp

@@ -43,14 +43,14 @@ extern void set_win_handle_window(HWND hwnd);
 //-----------------------------------------------------------------------------
 void init()
 {
-	memory::init_memory();
+	memory::init();
 	os::init_os();
 }
 
 //-----------------------------------------------------------------------------
 void shutdown()
 {
-	memory::shutdown_memory();
+	memory::shutdown();
 }
 
 //-----------------------------------------------------------------------------
@@ -214,7 +214,7 @@ public:
 	}
 
 	//-----------------------------------------------------------------------------
-	void setMousePos(int32_t x, int32_t y)
+	void set_mouse_pos(int32_t x, int32_t y)
 	{
 		POINT pt = {x, y};
 		ClientToScreen(m_hwnd, &pt);
@@ -231,11 +231,11 @@ public:
 				m_x = m_width / 2;
 				m_y = m_height / 2;
 				ShowCursor(false);
-				setMousePos(m_x, m_y);
+				set_mouse_pos(m_x, m_y);
 			}
 			else
 			{
-				setMousePos(m_x, m_y);
+				set_mouse_pos(m_x, m_y);
 				ShowCursor(true);
 			}
 
@@ -391,7 +391,7 @@ public:
 						break;
 					}
 
-					setMousePos(m_x, m_y);
+					set_mouse_pos(m_x, m_y);
 				}
 
 				// m_eventQueue.postMouseEvent(mx, my);