(svn r13607) -Fix (r13606): some coding style issues got fixed but some got/stayed broken
authorskidd13
Sun, 22 Jun 2008 15:41:38 +0000
changeset 11050 091271fcfbb9
parent 11049 f8bbc9635251
child 11052 81b8c4c90ff8
(svn r13607) -Fix (r13606): some coding style issues got fixed but some got/stayed broken
src/core/alloc_func.hpp
src/core/alloc_type.hpp
src/core/math_func.hpp
src/core/random_func.hpp
--- a/src/core/alloc_func.hpp	Sun Jun 22 15:21:51 2008 +0000
+++ b/src/core/alloc_func.hpp	Sun Jun 22 15:41:38 2008 +0000
@@ -76,7 +76,7 @@
  * @return NULL when num_elements == 0, non-NULL otherwise.
  */
 template <typename T>
-FORCEINLINE T *ReallocT(T *t_ptr, size_t num_elements)
+static FORCEINLINE T *ReallocT(T *t_ptr, size_t num_elements)
 {
 	/*
 	 * MorphOS cannot handle 0 elements allocations, or rather that always
--- a/src/core/alloc_type.hpp	Sun Jun 22 15:21:51 2008 +0000
+++ b/src/core/alloc_type.hpp	Sun Jun 22 15:41:38 2008 +0000
@@ -29,28 +29,39 @@
 
 	/** Allocating the memory */
 	SmallStackSafeStackAlloc() : data(MallocT<T>(length)), len(length) {}
+
 	/** And freeing when it goes out of scope */
-	~SmallStackSafeStackAlloc() { free(data); }
+	~SmallStackSafeStackAlloc()
+	{
+		free(data);
+	}
 #endif
 
 	/**
 	 * Gets a pointer to the data stored in this wrapper.
 	 * @return the pointer.
 	 */
-	FORCEINLINE operator T* () { return data; }
+	FORCEINLINE operator T* ()
+	{
+		return data;
+	}
 
 	/**
 	 * Gets a pointer to the data stored in this wrapper.
 	 * @return the pointer.
 	 */
-	FORCEINLINE T* operator -> () { return data; }
+	FORCEINLINE T* operator -> ()
+	{
+		return data;
+	}
 
 	/**
 	 * Gets a pointer to the last data element stored in this wrapper.
 	 * @note needed because endof does not work properly for pointers.
 	 * @return the 'endof' pointer.
 	 */
-	FORCEINLINE T* EndOf() {
+	FORCEINLINE T* EndOf()
+	{
 #if !defined(__NDS__)
 		return endof(data);
 #else
--- a/src/core/math_func.hpp	Sun Jun 22 15:21:51 2008 +0000
+++ b/src/core/math_func.hpp	Sun Jun 22 15:41:38 2008 +0000
@@ -192,7 +192,8 @@
  * @return The absolute difference between the given scalars
  */
 template <typename T>
-static FORCEINLINE T Delta(const T a, const T b) {
+static FORCEINLINE T Delta(const T a, const T b)
+{
 	return (a < b) ? b - a : a - b;
 }
 
--- a/src/core/random_func.hpp	Sun Jun 22 15:21:51 2008 +0000
+++ b/src/core/random_func.hpp	Sun Jun 22 15:41:38 2008 +0000
@@ -59,12 +59,26 @@
 	#define RandomRange(max) DoRandomRange(max, __LINE__, __FILE__)
 	uint DoRandomRange(uint max, int line, const char *file);
 #else
-	static FORCEINLINE uint32 Random() { return _random.Next(); }
-	static FORCEINLINE uint32 RandomRange(uint16 max) { return _random.Next(max); }
+	static FORCEINLINE uint32 Random()
+	{
+		return _random.Next();
+	}
+
+	static FORCEINLINE uint32 RandomRange(uint16 max)
+	{
+		return _random.Next(max);
+	}
 #endif
 
-static FORCEINLINE uint32 InteractiveRandom() { return _interactive_random.Next(); }
-static FORCEINLINE uint32 InteractiveRandomRange(uint16 max) { return _interactive_random.Next(max); }
+static FORCEINLINE uint32 InteractiveRandom()
+{
+	return _interactive_random.Next();
+}
+
+static FORCEINLINE uint32 InteractiveRandomRange(uint16 max)
+{
+	return _interactive_random.Next(max);
+}
 
 /**
  * Checks if a given randomize-number is below a given probability.