aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/vect.hh
diff options
context:
space:
mode:
authorschnetter <>2004-08-14 05:41:00 +0000
committerschnetter <>2004-08-14 05:41:00 +0000
commit9630ebd7b6632e5e6e896857697fd004bb199e80 (patch)
treeb03362ddeaf8e30e7fd7757edb86ef0a869ad13b /Carpet/CarpetLib/src/vect.hh
parent69b18dea57e95ec720b259d1cc78db3cf0d8d2d4 (diff)
Explain the harmless compiler warnings about array indices out of
Explain the harmless compiler warnings about array indices out of range. darcs-hash:20040814054125-07bb3-232abf6b8906138d6b7425e2ec05feca8eac2368.gz
Diffstat (limited to 'Carpet/CarpetLib/src/vect.hh')
-rw-r--r--Carpet/CarpetLib/src/vect.hh8
1 files changed, 7 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/vect.hh b/Carpet/CarpetLib/src/vect.hh
index a49c55978..9160c76aa 100644
--- a/Carpet/CarpetLib/src/vect.hh
+++ b/Carpet/CarpetLib/src/vect.hh
@@ -1,4 +1,4 @@
-// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/vect.hh,v 1.28 2004/05/27 12:26:09 schnetter Exp $
+// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/vect.hh,v 1.29 2004/08/14 07:41:25 schnetter Exp $
#ifndef VECT_HH
#define VECT_HH
@@ -55,18 +55,24 @@ public:
/** Constructor for 2-element vectors from 2 elements. */
vect (const T x, const T y) {
assert (D==2);
+ // Note: this statement may give "index out of range" warnings.
+ // You can safely ignore these.
elt[0]=x; elt[1]=y;
}
/** Constructor for 3-element vectors from 3 elements. */
vect (const T x, const T y, const T z) {
assert (D==3);
+ // Note: this statement may give "index out of range" warnings.
+ // You can safely ignore these.
elt[0]=x; elt[1]=y; elt[2]=z;
}
/** Constructor for 4-element vectors from 4 elements. */
vect (const T x, const T y, const T z, const T t) {
assert (D==4);
+ // Note: this statement may give "index out of range" warnings.
+ // You can safely ignore these.
elt[0]=x; elt[1]=y; elt[2]=z; elt[3]=t;
}