From e06abb42592bd3f1581f31ad0a59df86fcf1a072 Mon Sep 17 00:00:00 2001 From: Daniel Santos Date: Fri, 7 Dec 2012 13:30:31 -0600 Subject: =?UTF-8?q?Fix=20bug=20on=20gcc-4.7:=20=E2=80=98SetCapacity=E2=80=99?= =?UTF-8?q?=20was=20not=20declared=20in=20this=20scope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This appears to be an issue where previous versions of gcc weren't compliant with the standard and are now. Specifically, it shouldn't have resolved the unqualified name "SetCapacity" from a base class when it is dependant upon a template type. Signed-off-by: Daniel Santos --- p7zip/CPP/7zip/Compress/LzhDecoder.h | 2 +- p7zip/CPP/Common/DynamicBuffer.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/p7zip/CPP/7zip/Compress/LzhDecoder.h b/p7zip/CPP/7zip/Compress/LzhDecoder.h index ed631e2..4c32d63 100644 --- a/p7zip/CPP/7zip/Compress/LzhDecoder.h +++ b/p7zip/CPP/7zip/Compress/LzhDecoder.h @@ -39,7 +39,7 @@ public: { if (Symbol >= 0) return (UInt32)Symbol; - return DecodeSymbol(bitStream); + return this->DecodeSymbol(bitStream); } }; diff --git a/p7zip/CPP/Common/DynamicBuffer.h b/p7zip/CPP/Common/DynamicBuffer.h index fd33cec..7a5e4bd 100644 --- a/p7zip/CPP/Common/DynamicBuffer.h +++ b/p7zip/CPP/Common/DynamicBuffer.h @@ -17,7 +17,7 @@ template class CDynamicBuffer: public CBuffer else delta = 4; delta = MyMax(delta, size); - SetCapacity(this->_capacity + delta); + this->SetCapacity(this->_capacity + delta); } public: CDynamicBuffer(): CBuffer() {}; @@ -28,7 +28,7 @@ public: this->Free(); if (buffer._capacity > 0) { - SetCapacity(buffer._capacity); + this->SetCapacity(buffer._capacity); memmove(this->_items, buffer._items, buffer._capacity * sizeof(T)); } return *this; -- 1.7.8.6