diff options
author | dholland <dholland@pkgsrc.org> | 2011-09-12 06:33:11 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2011-09-12 06:33:11 +0000 |
commit | 9c4602e3d0d5956057f3dba20b1a6d61da5bd9cd (patch) | |
tree | 13a3255c5bf87f1cb6503589457f5af8a0afb55d | |
parent | 2b6d7bae31d9dc308fc64d7a315c476d9671194f (diff) | |
download | pkgsrc-9c4602e3d0d5956057f3dba20b1a6d61da5bd9cd.tar.gz |
Tweak the C++ to hopefully appease clang.
-rw-r--r-- | audio/mp3check/distinfo | 4 | ||||
-rw-r--r-- | audio/mp3check/patches/patch-tmap_h | 15 | ||||
-rw-r--r-- | audio/mp3check/patches/patch-tvector_h | 15 |
3 files changed, 33 insertions, 1 deletions
diff --git a/audio/mp3check/distinfo b/audio/mp3check/distinfo index 1b7cd1a4e24..d17bef6804d 100644 --- a/audio/mp3check/distinfo +++ b/audio/mp3check/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.7 2007/08/31 10:37:36 drochner Exp $ +$NetBSD: distinfo,v 1.8 2011/09/12 06:33:11 dholland Exp $ SHA1 (mp3check-0.8.3.tar.gz) = 4921a0f5250016abd8fe92d8ca4522c4c6e8b657 RMD160 (mp3check-0.8.3.tar.gz) = da244159e2f6637d5bd1d386dbca6a2078329bdb @@ -7,3 +7,5 @@ SHA1 (patch-aa) = df47e94ed8a765d58da8fcabaf407df8931843e3 SHA1 (patch-ab) = 86e1da01f1407f748dbd2fa8436e2d2cdaaf3f4d SHA1 (patch-ad) = ca416a54a1b751f7587f977288a99b5da061a12a SHA1 (patch-ae) = 8858652cd376372411366d6c06e1e31e4d4b7590 +SHA1 (patch-tmap_h) = 82e920d20755a7d9cd1e9a71cc24e0262e7f4cda +SHA1 (patch-tvector_h) = 35dede366687d71b2efe1f04a51b24f5cdbbbccc diff --git a/audio/mp3check/patches/patch-tmap_h b/audio/mp3check/patches/patch-tmap_h new file mode 100644 index 00000000000..99d62e4dcc8 --- /dev/null +++ b/audio/mp3check/patches/patch-tmap_h @@ -0,0 +1,15 @@ +$NetBSD: patch-tmap_h,v 1.1 2011/09/12 06:33:11 dholland Exp $ + +- C++ tweaks to appease clang + +--- tmap.h~ 2006-09-21 21:17:07.000000000 +0000 ++++ tmap.h +@@ -54,7 +54,7 @@ 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(); } + /// 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) diff --git a/audio/mp3check/patches/patch-tvector_h b/audio/mp3check/patches/patch-tvector_h new file mode 100644 index 00000000000..5797a35c8d9 --- /dev/null +++ b/audio/mp3check/patches/patch-tvector_h @@ -0,0 +1,15 @@ +$NetBSD: patch-tvector_h,v 1.1 2011/09/12 06:33:11 dholland Exp $ + +- C++ tweaks to appease clang + +--- tvector.h~ 2006-09-21 21:17:07.000000000 +0000 ++++ tvector.h +@@ -60,7 +60,7 @@ class tvector: public tvector_base<T> { + /// append an element to the end + const tvector& operator += (const T& a) { 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; } + /// 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 |