Browse Source

Nothing important

Panagiotis Christopoulos Charitos 11 years ago
parent
commit
a999a190bc
2 changed files with 17 additions and 2 deletions
  1. 2 2
      include/anki/Config.h.cmake
  2. 15 0
      include/anki/util/StdTypes.h

+ 2 - 2
include/anki/Config.h.cmake

@@ -151,12 +151,12 @@
 #	define ANKI_LIKELY(x) __builtin_expect((x), 1)
 #	define ANKI_LIKELY(x) __builtin_expect((x), 1)
 #	define ANKI_UNLIKELY(x) __builtin_expect((x), 0)
 #	define ANKI_UNLIKELY(x) __builtin_expect((x), 0)
 #	define ANKI_RESTRICT __restrict
 #	define ANKI_RESTRICT __restrict
-#	define ANKI_ATTRIBUTE_ALIGNED(attr_, al_) \
-		attr_ __attribute__ ((aligned (al_)))
+#	define ANKI_USE_RESULT __attribute__((warn_unused_result))
 #else
 #else
 #	define ANKI_LIKELY(x) ((x) == 1)
 #	define ANKI_LIKELY(x) ((x) == 1)
 #	define ANKI_UNLIKELY(x) ((x) == 1)
 #	define ANKI_UNLIKELY(x) ((x) == 1)
 #	define ANKI_RESTRICT
 #	define ANKI_RESTRICT
+#	define ANKI_USE_RESULT
 #endif
 #endif
 
 
 /// @}
 /// @}

+ 15 - 0
include/anki/util/StdTypes.h

@@ -71,6 +71,21 @@ const F64 MIN_F64 = -std::numeric_limits<F64>::max();
 using Bool = bool; ///< Fast boolean type
 using Bool = bool; ///< Fast boolean type
 using Bool8 = U8; ///< Small 8bit boolean type
 using Bool8 = U8; ///< Small 8bit boolean type
 
 
+/// Error codes
+enum Error
+{
+	ERROR_NONE,
+	ERROR_OUT_OF_MEMORY,
+	ERROR_FUNCTION_FAILED, ///< External operation failed
+	ERROR_INITIALIZATION_FAILED,
+
+	// File errors
+	ERROR_FILE_NOT_FOUND,
+	ERROR_FILE_ACCESS, ///< Read/write access error
+
+	ERROR_UNKNOWN
+};
+
 /// @}
 /// @}
 
 
 } // end namespace anki
 } // end namespace anki