소스 검색

BitVector don't have copy-constructor/operator=

Luis Anton 13 년 전
부모
커밋
5b033f7066
1개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 15 0
      Engine/source/core/bitVector.h

+ 15 - 0
Engine/source/core/bitVector.h

@@ -56,10 +56,14 @@ class BitVector
       /// Constructs a bit vector with the desired size.
       /// @note The resulting vector is not cleared.
       BitVector( U32 sizeInBits );
+
+	  BitVector( const BitVector &r);
       
       /// Destructor.
       ~BitVector();
 
+	  BitVector& operator=( const BitVector &r);
+
       /// @name Size Management
       /// @{
 
@@ -150,6 +154,17 @@ inline BitVector::BitVector( U32 sizeInBits )
    setSize( sizeInBits );
 }
 
+inline BitVector::BitVector( const BitVector &r )
+{
+	copy(r);
+}
+
+inline BitVector& BitVector::operator=( const BitVector &r)
+{
+	copy(r);
+	return *this;
+}
+
 inline BitVector::~BitVector()
 {
    delete [] mBits;