summaryrefslogtreecommitdiff
path: root/zip/ZipArchive/ZipCollections_stl.h
diff options
context:
space:
mode:
Diffstat (limited to 'zip/ZipArchive/ZipCollections_stl.h')
-rw-r--r--zip/ZipArchive/ZipCollections_stl.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/zip/ZipArchive/ZipCollections_stl.h b/zip/ZipArchive/ZipCollections_stl.h
index 3facaad..c1c2b4e 100644
--- a/zip/ZipArchive/ZipCollections_stl.h
+++ b/zip/ZipArchive/ZipCollections_stl.h
@@ -1,6 +1,6 @@
////////////////////////////////////////////////////////////////////////////////
-// This source file is part of the ZipArchive library source distribution and
-// is Copyrighted 2000 - 2007 by Artpol Software - Tadeusz Dracz
+// This source file is part of the ZipArchive Library Open Source distribution
+// and is Copyrighted 2000 - 2022 by Artpol Software - Tadeusz Dracz
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@ -9,7 +9,7 @@
//
// For the licensing details refer to the License.txt file.
//
-// Web Site: http://www.artpol-software.com
+// Web Site: https://www.artpol-software.com
////////////////////////////////////////////////////////////////////////////////
#ifndef ZIPARCHIVE_ZIPCOLLECTIONS_DOT_H
@@ -76,7 +76,8 @@ public:
size_t GetSize() const{return this->size(); }
- size_t GetCount() const{return this->size(); }
+ void SetSize(size_t uSize) {this->resize(uSize); }
+ size_t GetCount() const{return this->size(); }
size_t GetUpperBound() const
{
size_t ret = this->size();
@@ -86,11 +87,11 @@ public:
}
TYPE& GetAt(size_t uIndex) {return this->at(uIndex);}
const TYPE& GetAt(size_t uIndex) const {return this->at(uIndex);}
+ void SetAt(size_t uIndex, TYPE value) {inherited::operator[](uIndex) = value; }
size_t Add(const TYPE& x) {this->push_back(x);return GetUpperBound();}
void RemoveAll() {this->clear();}
void RemoveAt(size_t uIndex) { this->erase(GetIterFromIndex(uIndex));}
void InsertAt(size_t uIndex, const TYPE& x){this->insert(GetIterFromIndex(uIndex), x);}
-
TYPE& operator[](size_t uIndex)
{
return inherited::operator[](uIndex);
@@ -115,7 +116,7 @@ public:
typedef typename std::list<TYPE>::const_iterator const_iterator;
size_t GetCount() const {return this->size();}
void AddTail(const TYPE& x){this->push_back(x);}
- void AddHead(const TYPE& x){this->push_front(x);}
+ void AddHead(const TYPE& x){push_front(x);}
void RemoveHead() {this->pop_front();}
void RemoveTail() {this->pop_back();}
void RemoveAll() {this->clear();}
@@ -175,7 +176,7 @@ public:
}
ZBOOL Lookup( KEY key, VALUE& rValue ) const
{
-#if (__GNUC__ >= 3) // The actual version number may be different.
+#if (__GNUC__ >= 3 || _MSC_VER >= 1910) // The actual version number might be different.
const_iterator iter = std::map<KEY, VALUE>::find(key);
if (iter == std::map<KEY, VALUE>::end())
#else