Author: wyoung
Date: Tue Oct 17 10:53:43 2006
New Revision: 1330
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1330&view=rev
Log:
Fixed a warning in GCC 4.1.1 (assignment in if statement silliness) due
to a suggestion by Korolyov Ilya <[EMAIL PROTECTED]>
Modified:
trunk/lib/custom.pl
Modified: trunk/lib/custom.pl
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/custom.pl?rev=1330&r1=1329&r2=1330&view=diff
==============================================================================
--- trunk/lib/custom.pl (original)
+++ trunk/lib/custom.pl Tue Oct 17 10:53:43 2006
@@ -203,8 +203,11 @@
$compp = "";
$set = "";
foreach my $j (1..$i) {
- $compr .= " if (cmp = mysqlpp::sql_cmp(x.C$j , y.C$j )) return cmp;
\\\n"
- unless $j == $i;
+ if ($j != $i) {
+ $compr .= " cmp = mysqlpp::sql_cmp(x.C$j , y.C$j ); \\\n";
+ $compr .= " if (cmp) return cmp; \\\n";
+ }
+
$compr .= " return mysqlpp::sql_cmp(x.C$j , y.C$j );" if $j == $i;
$parm2 .= "const T$j &p$j";
$parm2 .= ", " unless $j == $i;
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits