(svn r9635) [cpp_gui] -Codechange: use proper array item pointer arithmetics (pointer + index) instead of &pointer[index] since they can differ in C++ cpp_gui
authorKUDr
Sun, 15 Apr 2007 14:17:40 +0000
branchcpp_gui
changeset 6304 38b7e46e2def
parent 6303 84c215fc8eb8
child 6305 aa0faea50ab5
(svn r9635) [cpp_gui] -Codechange: use proper array item pointer arithmetics (pointer + index) instead of &pointer[index] since they can differ in C++
src/misc/blob.hpp
--- a/src/misc/blob.hpp	Mon Mar 26 22:15:38 2007 +0000
+++ b/src/misc/blob.hpp	Sun Apr 15 14:17:40 2007 +0000
@@ -264,7 +264,7 @@
 	FORCEINLINE Titem* GrowSizeC(int num_items)
 	{
 		Titem* pI = GrowSizeNC(num_items);
-		for (int i = 0; i < num_items; ++i) new (&pI[i]) Titem();
+		for (int i = 0; i < num_items; ++i) new (pI + i) Titem();
 		return pI;
 	}
 	/** Destroy given number of items and reduce the Blob's data size */