Really fix template lookup.
This commit is contained in:
parent
bc3fe21c40
commit
e7c40a171d
3 changed files with 20 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.9 2012/01/11 19:23:02 hans Exp $
|
||||
$NetBSD: distinfo,v 1.10 2012/08/10 18:02:12 joerg Exp $
|
||||
|
||||
SHA1 (mp3check-0.8.3.tar.gz) = 4921a0f5250016abd8fe92d8ca4522c4c6e8b657
|
||||
RMD160 (mp3check-0.8.3.tar.gz) = da244159e2f6637d5bd1d386dbca6a2078329bdb
|
||||
|
@ -7,5 +7,5 @@ SHA1 (patch-aa) = 0f2c2022951305e5efa5e057014fa17347704f47
|
|||
SHA1 (patch-ab) = 86e1da01f1407f748dbd2fa8436e2d2cdaaf3f4d
|
||||
SHA1 (patch-ad) = ca416a54a1b751f7587f977288a99b5da061a12a
|
||||
SHA1 (patch-ae) = 8858652cd376372411366d6c06e1e31e4d4b7590
|
||||
SHA1 (patch-tmap_h) = 82e920d20755a7d9cd1e9a71cc24e0262e7f4cda
|
||||
SHA1 (patch-tvector_h) = 35dede366687d71b2efe1f04a51b24f5cdbbbccc
|
||||
SHA1 (patch-tmap_h) = 9621cf08744cb164636c4b21087b415fa2f30471
|
||||
SHA1 (patch-tvector_h) = 02f6671dd45921e78aac24335522423f74c2b03c
|
||||
|
|
|
@ -1,15 +1,20 @@
|
|||
$NetBSD: patch-tmap_h,v 1.1 2011/09/12 06:33:11 dholland Exp $
|
||||
$NetBSD: patch-tmap_h,v 1.2 2012/08/10 18:02:12 joerg Exp $
|
||||
|
||||
- C++ tweaks to appease clang
|
||||
|
||||
--- tmap.h~ 2006-09-21 21:17:07.000000000 +0000
|
||||
--- tmap.h.orig 2006-09-21 21:17:07.000000000 +0000
|
||||
+++ tmap.h
|
||||
@@ -54,7 +54,7 @@ class tmap: public tmap_base<K,T> {
|
||||
@@ -54,11 +54,11 @@ class tmap: public tmap_base<K,T> {
|
||||
// new functionality
|
||||
|
||||
/// return whether an element with key is contained or not
|
||||
- bool contains(const K& key) const { return find(key) != tmap_base<K,T>::end(); }
|
||||
+ bool contains(const K& key) const { return tmap_base<K,T>::find(key) != tmap_base<K,T>::end(); }
|
||||
+ bool contains(const K& key) const { return this->find(key) != this->end(); }
|
||||
/// access element read only (const)
|
||||
// g++ 2.95.2 does not allow this:
|
||||
// const T& operator[](const K& key) const { const_iterator i = find(key); if(i != end()) return i->second; else throw TNotFoundException(); } // throw(TNotFoundException)
|
||||
- const T& operator[](const K& key) const { if(contains(key)) return find(key)->second; else throw TNotFoundException(); } // throw(TNotFoundException)
|
||||
+ const T& operator[](const K& key) const { if(contains(key)) return this->find(key)->second; else throw TNotFoundException(); } // throw(TNotFoundException)
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
$NetBSD: patch-tvector_h,v 1.1 2011/09/12 06:33:11 dholland Exp $
|
||||
$NetBSD: patch-tvector_h,v 1.2 2012/08/10 18:02:13 joerg Exp $
|
||||
|
||||
- C++ tweaks to appease clang
|
||||
|
||||
--- tvector.h~ 2006-09-21 21:17:07.000000000 +0000
|
||||
--- tvector.h.orig 2006-09-21 21:17:07.000000000 +0000
|
||||
+++ tvector.h
|
||||
@@ -60,7 +60,7 @@ class tvector: public tvector_base<T> {
|
||||
@@ -58,9 +58,9 @@ class tvector: public tvector_base<T> {
|
||||
// new functionality
|
||||
|
||||
/// append an element to the end
|
||||
const tvector& operator += (const T& a) { push_back(a); return *this; }
|
||||
- const tvector& operator += (const T& a) { push_back(a); return *this; }
|
||||
+ const tvector& operator += (const T& a) { this->push_back(a); return *this; }
|
||||
/// append another tvector to the end
|
||||
- const tvector& operator += (const tvector& a) { insert(tvector_base<T>::end(), a.tvector_base<T>::begin(), a.tvector_base<T>::end()); return *this; }
|
||||
+ const tvector& operator += (const tvector& a) { tvector_base<T>::insert(tvector_base<T>::end(), a.tvector_base<T>::begin(), a.tvector_base<T>::end()); return *this; }
|
||||
+ const tvector& operator += (const tvector& a) { this->insert(tvector_base<T>::end(), a.tvector_base<T>::begin(), a.tvector_base<T>::end()); return *this; }
|
||||
/// direct read only access, safe
|
||||
const T& operator[](size_t i) const { if(i < tvector_base<T>::size()) return tvector_base<T>::operator[](i); else throw TZeroBasedIndexOutOfRangeException(i, tvector_base<T>::size()); } // throw(TZeroBasedIndexOutOfRangeException);
|
||||
/// direct read/write access, automatically create new elements
|
||||
|
|
Loading…
Reference in a new issue