diff options
author | wr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b> | 2005-02-08 22:51:17 +0000 |
---|---|---|
committer | wr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b> | 2005-02-08 22:51:17 +0000 |
commit | b92d19d8d78573cfbe5c3c4cedf8c226be6efcf4 (patch) | |
tree | 00588528cf821e585f29f15a00627a07f3e31697 /muggle-plugin/mg_order.c | |
parent | 64aced2ec9331b254864521d067741f9ddf7851f (diff) | |
download | vdr-plugin-muggle-b92d19d8d78573cfbe5c3c4cedf8c226be6efcf4.tar.gz vdr-plugin-muggle-b92d19d8d78573cfbe5c3c4cedf8c226be6efcf4.tar.bz2 |
make it compilable with 2.95
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk@464 e10066b5-e1e2-0310-b819-94efdf66514b
Diffstat (limited to 'muggle-plugin/mg_order.c')
-rw-r--r-- | muggle-plugin/mg_order.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/muggle-plugin/mg_order.c b/muggle-plugin/mg_order.c index 46d4d57..cc93141 100644 --- a/muggle-plugin/mg_order.c +++ b/muggle-plugin/mg_order.c @@ -1,6 +1,7 @@ #include "mg_order.h" #include "mg_tools.h" #include "i18n.h" +#include <stdio.h> bool iskeyGenre(mgKeyTypes kt) @@ -28,7 +29,7 @@ sql_string (MYSQL *db, const string s) return ""; char *buf = (char *) malloc (s.size () * 2 + 1); mysql_real_escape_string (db, buf, s.c_str (), s.size ()); - string result = "'" + std::string (buf) + "'"; + string result = "'" + string (buf) + "'"; free (buf); return result; } @@ -866,8 +867,11 @@ mgReferences::mgReferences() bool mgReferences::Equal(unsigned int i,string table1, string table2) const { - return (((at(i).t1()==table1) && (at(i).t2()==table2)) - || ((at(i).t1()==table2) && (at(i).t2()==table1))); + const mgReference& r = operator[](i); + string s1 = r.t1(); + string s2 = r.t2(); + return ((s1==table1) && (s2==table2)) + || ((s1==table2) && (s2==table1)); } mgParts @@ -875,7 +879,7 @@ mgReferences::FindConnectionBetween(string table1, string table2) const { for (unsigned int i=0 ; i<size(); i++ ) if (Equal(i,table1,table2)) - return mgRefParts(at(i)); + return mgRefParts(operator[](i)); return mgParts(); } |