summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjhoffert <jhoffert@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-11-10 14:35:55 +0000
committerjhoffert <jhoffert@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-11-10 14:35:55 +0000
commit632a3265d3bc6b285bf59a6d768af8669cc56064 (patch)
treeb38d7d8ab7011e694e939538f17f1bf9118039a5
parent18b6f570d495f1072f19cf1d969688202caacbdf (diff)
downloadATCD-632a3265d3bc6b285bf59a6d768af8669cc56064.tar.gz
Fixing bounds checking to denote past end (or before beginning) of sequence.
-rw-r--r--TAO/tao/Generic_Sequence_T.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/TAO/tao/Generic_Sequence_T.h b/TAO/tao/Generic_Sequence_T.h
index 176605266c3..9c729db216a 100644
--- a/TAO/tao/Generic_Sequence_T.h
+++ b/TAO/tao/Generic_Sequence_T.h
@@ -453,7 +453,7 @@ public:
typedef T value_type;
typedef T *pointer;
typedef T &reference;
- typedef int difference_type;
+ typedef CORBA::Long difference_type;
/// Construct a Generic_Sequence_Iterator at position pos with past_end flag.
Generic_Sequence_Iterator (generic_sequence<T, ALLOCATION_TRAITS, ELEMENT_TRAITS> &sequence, size_t pos = 0)
@@ -588,7 +588,7 @@ private:
/// Check the length of the sequence to see if we're past the end.
void check_position (void)
{
- if (this->pos_ >= this->length)
+ if (this->pos_ >= static_cast<CORBA::Long> (this->sequence_.length_))
{
this->past_end_ = true;
}
@@ -601,7 +601,7 @@ private:
}
}
- /// the array we are dealing with
+ /// the array with which we are dealing
generic_sequence<T, ALLOCATION_TRAITS, ELEMENT_TRAITS> &sequence_;
/// Our current position in the sequence.
@@ -784,7 +784,7 @@ private:
/// Check the length of the sequence to see if we're past the end.
void check_position (void)
{
- if (this->pos_ >= this->length)
+ if (this->pos_ >= static_cast<CORBA::Long> (this->sequence_.length_))
{
this->past_end_ = true;
}