From 84220d2ca05707f22a0242b1745caf0b657237a3 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sat, 6 Aug 2011 09:47:19 +0200 Subject: COMMON: Remove superfluous Common:: qualifiers. --- common/array.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/array.h') diff --git a/common/array.h b/common/array.h index e5434091fb..af1fe574f6 100644 --- a/common/array.h +++ b/common/array.h @@ -42,7 +42,7 @@ namespace Common { * management scheme. There, only elements that 'live' are actually constructed * (i.e., have their constructor called), and objects that are removed are * immediately destructed (have their destructor called). - * With Common::Array, this is not the case; instead, it simply uses new[] and + * With Array, this is not the case; instead, it simply uses new[] and * delete[] to allocate whole blocks of objects, possibly more than are * currently 'alive'. This simplifies memory management, but may have * undesirable side effects when one wants to use an Array of complex -- cgit v1.2.3 From 79729d03e014962cd9bcef263145997eec63ec38 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sat, 6 Aug 2011 09:47:51 +0200 Subject: COMMON: Use correct format specifier. --- common/array.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/array.h') diff --git a/common/array.h b/common/array.h index af1fe574f6..bc378d5233 100644 --- a/common/array.h +++ b/common/array.h @@ -274,7 +274,7 @@ protected: if (capacity) { _storage = new T[capacity]; if (!_storage) - ::error("Common::Array: failure to allocate %d bytes", capacity); + ::error("Common::Array: failure to allocate %u bytes", capacity); } else { _storage = 0; } -- cgit v1.2.3 From c876e87efc574a646268bd57428cdcef87a517a8 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sun, 7 Aug 2011 15:02:43 +0200 Subject: COMMON: Correct error message. The message displays bytes, but capacity is the count of objects, so multiply by their size. --- common/array.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/array.h') diff --git a/common/array.h b/common/array.h index bc378d5233..18cecfb98f 100644 --- a/common/array.h +++ b/common/array.h @@ -274,7 +274,7 @@ protected: if (capacity) { _storage = new T[capacity]; if (!_storage) - ::error("Common::Array: failure to allocate %u bytes", capacity); + ::error("Common::Array: failure to allocate %u bytes", capacity * (uint)sizeof(T)); } else { _storage = 0; } -- cgit v1.2.3