aboutsummaryrefslogtreecommitdiff
path: root/multimedia/mythtv
diff options
context:
space:
mode:
authorBernhard Froehlich <decke@FreeBSD.org>2010-12-02 19:53:58 +0000
committerBernhard Froehlich <decke@FreeBSD.org>2010-12-02 19:53:58 +0000
commit31c2768a6d2e00622ed2e46ae40328408f67215b (patch)
treef2c6d79b7606d0432a611881151a667628e95357 /multimedia/mythtv
parent43a46c6993b270c965c21db4fac822d938ec1475 (diff)
downloadports-31c2768a6d2e00622ed2e46ae40328408f67215b.tar.gz
ports-31c2768a6d2e00622ed2e46ae40328408f67215b.zip
Notes
Diffstat (limited to 'multimedia/mythtv')
-rw-r--r--multimedia/mythtv/files/patch-libs__libmyth__mythdeque.h49
-rw-r--r--multimedia/mythtv/files/patch-libs__libmythtv__recordingprofile.h11
-rw-r--r--multimedia/mythtv/files/patch-libs__libmythupnp__eventing.h29
3 files changed, 89 insertions, 0 deletions
diff --git a/multimedia/mythtv/files/patch-libs__libmyth__mythdeque.h b/multimedia/mythtv/files/patch-libs__libmyth__mythdeque.h
new file mode 100644
index 000000000000..a911b0c9573f
--- /dev/null
+++ b/multimedia/mythtv/files/patch-libs__libmyth__mythdeque.h
@@ -0,0 +1,49 @@
+--- ./libs/libmyth/mythdeque.h (revision 20349)
++++ ./libs/libmyth/mythdeque.h (revision 26434)
+@@ -4,6 +4,12 @@
+ #define __MYTH_DEQUE_H__
+
++#include <QString>
+ #include <deque>
+ using namespace std;
++
++template<typename T>
++inline T myth_deque_init(const T*) { return (T)(0); }
++template<>
++inline QString myth_deque_init(const QString*) { return QString(); }
+
+ /** \class MythDeque
+@@ -19,6 +25,7 @@
+ T dequeue()
+ {
++ T *dummy = NULL;
+ if (deque<T>::empty())
+- return (T)(0);
++ return myth_deque_init(dummy);
+ T item = deque<T>::front();
+ deque<T>::pop_front();
+@@ -66,14 +73,20 @@
+
+ /// \brief Returns item at head of list. O(1).
+- T head() { return (deque<T>::size()) ? deque<T>::front() : (T)(NULL); }
++ T head()
++ { if (!deque<T>::empty()) return deque<T>::front();
++ T *dummy = NULL; return myth_deque_init(dummy); }
+ /// \brief Returns item at head of list. O(1).
+ const T head() const
+- { return (deque<T>::size()) ? deque<T>::front() : (T)(NULL); }
++ { if (!deque<T>::empty()) return deque<T>::front();
++ T *dummy = NULL; return myth_deque_init(dummy); }
+
+ /// \brief Returns item at tail of list. O(1).
+- T tail() { return (deque<T>::size()) ? deque<T>::back() : (T)(NULL); }
++ T tail()
++ { if (!deque<T>::empty()) return deque<T>::back();
++ T *dummy = NULL; return myth_deque_init(dummy); }
+ /// \brief Returns item at tail of list. O(1).
+ const T tail() const
+- { return (deque<T>::size()) ? deque<T>::back() : (T)(NULL); }
++ { if (!deque<T>::empty()) return deque<T>::back();
++ T *dummy = NULL; return myth_deque_init(dummy); }
+ };
+
diff --git a/multimedia/mythtv/files/patch-libs__libmythtv__recordingprofile.h b/multimedia/mythtv/files/patch-libs__libmythtv__recordingprofile.h
new file mode 100644
index 000000000000..ce37bfe29256
--- /dev/null
+++ b/multimedia/mythtv/files/patch-libs__libmythtv__recordingprofile.h
@@ -0,0 +1,11 @@
+--- ./libs/libmythtv/recordingprofile.h.orig 2009-10-22 03:30:12.000000000 +0400
++++ ./libs/libmythtv/recordingprofile.h 2010-12-01 23:01:20.247699483 +0300
+@@ -84,7 +84,7 @@
+
+ public:
+ // initializers
+- RecordingProfile(QString profName = NULL);
++ RecordingProfile(QString profName = QString());
+ virtual void loadByID(int id);
+ virtual bool loadByType(const QString &name, const QString &cardtype);
+ virtual bool loadByGroup(const QString &name, const QString &group);
diff --git a/multimedia/mythtv/files/patch-libs__libmythupnp__eventing.h b/multimedia/mythtv/files/patch-libs__libmythupnp__eventing.h
new file mode 100644
index 000000000000..72ccc8be963b
--- /dev/null
+++ b/multimedia/mythtv/files/patch-libs__libmythupnp__eventing.h
@@ -0,0 +1,29 @@
+--- ./libs/libmythupnp/eventing.h (revision 23038)
++++ ./libs/libmythupnp/eventing.h (revision 26434)
+@@ -174,4 +174,9 @@
+ //////////////////////////////////////////////////////////////////////////////
+
++template<typename T>
++inline T state_var_init(const T*) { return (T)(0); }
++template<>
++inline QString state_var_init(const QString*) { return QString(); }
++
+ class UPNP_PUBLIC StateVariables
+ {
+@@ -232,7 +237,8 @@
+ T GetValue( const QString &sName )
+ {
++ T *dummy = NULL;
+ SVMap::iterator it = m_map.find(sName);
+ if (it == m_map.end())
+- return T(0);
++ return state_var_init(dummy);
+
+ StateVariable< T > *pVariable =
+@@ -242,5 +248,5 @@
+ return pVariable->GetValue();
+
+- return T(0);
++ return state_var_init(dummy);
+ }
+