From 80c66147a5c7661a6826161d88bca635d9f72db5 Mon Sep 17 00:00:00 2001 From: joerg Date: Fri, 10 Aug 2012 18:02:12 +0000 Subject: Really fix template lookup. --- audio/mp3check/distinfo | 6 +++--- audio/mp3check/patches/patch-tmap_h | 13 +++++++++---- audio/mp3check/patches/patch-tvector_h | 13 ++++++++----- 3 files changed, 20 insertions(+), 12 deletions(-) (limited to 'audio') diff --git a/audio/mp3check/distinfo b/audio/mp3check/distinfo index 372d376b9e3..ae9d52c1806 100644 --- a/audio/mp3check/distinfo +++ b/audio/mp3check/distinfo @@ -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 diff --git a/audio/mp3check/patches/patch-tmap_h b/audio/mp3check/patches/patch-tmap_h index 99d62e4dcc8..6bfa6bb5791 100644 --- a/audio/mp3check/patches/patch-tmap_h +++ b/audio/mp3check/patches/patch-tmap_h @@ -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 { +@@ -54,11 +54,11 @@ class tmap: public tmap_base { // new functionality /// return whether an element with key is contained or not - bool contains(const K& key) const { return find(key) != tmap_base::end(); } -+ bool contains(const K& key) const { return tmap_base::find(key) != tmap_base::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) + }; + + diff --git a/audio/mp3check/patches/patch-tvector_h b/audio/mp3check/patches/patch-tvector_h index 5797a35c8d9..1b89cc0f060 100644 --- a/audio/mp3check/patches/patch-tvector_h +++ b/audio/mp3check/patches/patch-tvector_h @@ -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 { +@@ -58,9 +58,9 @@ class tvector: public tvector_base { + // 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::end(), a.tvector_base::begin(), a.tvector_base::end()); return *this; } -+ const tvector& operator += (const tvector& a) { tvector_base::insert(tvector_base::end(), a.tvector_base::begin(), a.tvector_base::end()); return *this; } ++ const tvector& operator += (const tvector& a) { this->insert(tvector_base::end(), a.tvector_base::begin(), a.tvector_base::end()); return *this; } /// direct read only access, safe const T& operator[](size_t i) const { if(i < tvector_base::size()) return tvector_base::operator[](i); else throw TZeroBasedIndexOutOfRangeException(i, tvector_base::size()); } // throw(TZeroBasedIndexOutOfRangeException); /// direct read/write access, automatically create new elements -- cgit v1.2.3