Explorar el Código

core: cleanup

Daniele Bartolini hace 7 años
padre
commit
885e5a9cb0

+ 2 - 1
src/core/filesystem/path.cpp

@@ -4,8 +4,9 @@
  */
 
 #include "core/filesystem/path.h"
+#include "core/platform.h"
 #include "core/strings/dynamic_string.h"
-#include <ctype.h> // isalpha
+#include <ctype.h>  // isalpha
 #include <string.h> // strrchr
 
 namespace crown

+ 0 - 1
src/core/filesystem/path.h

@@ -5,7 +5,6 @@
 
 #pragma once
 
-#include "core/platform.h"
 #include "core/strings/types.h"
 
 namespace crown

+ 1 - 1
src/core/thread/atomic_int.cpp

@@ -13,8 +13,8 @@
 namespace crown
 {
 AtomicInt::AtomicInt(s32 val)
+	: _val(val)
 {
-	store(val);
 }
 
 s32 AtomicInt::load()

+ 1 - 1
src/core/thread/atomic_int.h

@@ -16,7 +16,7 @@ struct AtomicInt
 {
 	s32 _val;
 
-	///
+	/// Initialization is not atomic.
 	AtomicInt(s32 val);
 
 	///

+ 2 - 0
src/core/thread/condition_variable.cpp

@@ -3,6 +3,8 @@
  * License: https://github.com/dbartolini/crown/blob/master/LICENSE
  */
 
+#include "core/error/error.h"
+#include "core/platform.h"
 #include "core/thread/condition_variable.h"
 
 #if CROWN_PLATFORM_POSIX

+ 2 - 0
src/core/thread/mutex.cpp

@@ -3,6 +3,8 @@
  * License: https://github.com/dbartolini/crown/blob/master/LICENSE
  */
 
+#include "core/error/error.h"
+#include "core/platform.h"
 #include "core/thread/mutex.h"
 
 #if CROWN_PLATFORM_POSIX

+ 0 - 2
src/core/thread/mutex.h

@@ -5,8 +5,6 @@
 
 #pragma once
 
-#include "core/error/error.h"
-#include "core/platform.h"
 #include "core/types.h"
 
 namespace crown

+ 1 - 0
src/core/thread/semaphore.cpp

@@ -4,6 +4,7 @@
  */
 
 #include "core/error/error.h"
+#include "core/platform.h"
 #include "core/thread/semaphore.h"
 
 #if CROWN_PLATFORM_POSIX

+ 0 - 1
src/core/thread/semaphore.h

@@ -5,7 +5,6 @@
 
 #pragma once
 
-#include "core/platform.h"
 #include "core/types.h"
 
 namespace crown

+ 1 - 0
src/core/thread/thread.cpp

@@ -4,6 +4,7 @@
  */
 
 #include "core/error/error.h"
+#include "core/platform.h"
 #include "core/thread/thread.h"
 
 #if CROWN_PLATFORM_POSIX

+ 0 - 1
src/core/thread/thread.h

@@ -5,7 +5,6 @@
 
 #pragma once
 
-#include "core/platform.h"
 #include "core/thread/semaphore.h"
 #include "core/types.h"