[libgdamm] Use default arguments for potentially unused arguments of SqlBuilder::add_cond()
- From: Johannes Schmid <jhs src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libgdamm] Use default arguments for potentially unused arguments of SqlBuilder::add_cond()
- Date: Thu, 1 Oct 2009 19:45:47 +0000 (UTC)
commit 6aa7b2295151059a1139095dd414f2a053acb3ad
Author: Johannes Schmid <jhs gnome org>
Date: Thu Oct 1 21:45:35 2009 +0200
Use default arguments for potentially unused arguments of SqlBuilder::add_cond()
ChangeLog | 7 +++++++
examples/sqlbuilder/main.cc | 2 +-
libgda/src/sqlbuilder.hg | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 223cbc4..19aa4cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2009-10-01 Johannes Schmid <jschmid openismus com>
+ * libgda/src/sqlbuilder.hg: Use default arguments for potentially unused
+ arguments of add_cond()
+
+ * examples/sqlbuilder/main.cc: Make use of new default argument
+
+2009-10-01 Johannes Schmid <jschmid openismus com>
+
* libgda/src/sqlbuilder.hg/ccg:
* libgda/src/libgda_methods.defs:
Updated GdaSqlBuilder bindings to use new method names from libgda
diff --git a/examples/sqlbuilder/main.cc b/examples/sqlbuilder/main.cc
index 52a3f0d..3263fcf 100644
--- a/examples/sqlbuilder/main.cc
+++ b/examples/sqlbuilder/main.cc
@@ -31,7 +31,7 @@ int main()
up_builder->add_expr(Gnome::Gda::Value("A0E'FESP")));
guint id = up_builder->add_id("id");
guint value = up_builder->add_expr(Gnome::Gda::Value(14));
- guint cond = up_builder->add_cond(Gnome::Gda::SQL_OPERATOR_TYPE_EQ, id, value, 0);
+ guint cond = up_builder->add_cond(Gnome::Gda::SQL_OPERATOR_TYPE_EQ, id, value);
up_builder->set_where(cond);
render_as_sql (up_builder);
diff --git a/libgda/src/sqlbuilder.hg b/libgda/src/sqlbuilder.hg
index 1400871..34c26bb 100644
--- a/libgda/src/sqlbuilder.hg
+++ b/libgda/src/sqlbuilder.hg
@@ -95,7 +95,7 @@ public:
*
* @return the ID of the new expression, or 0 if there was an error
*/
- guint add_cond(SqlOperatorType op, guint op1, guint op2, guint op3);
+ guint add_cond(SqlOperatorType op, guint op1, guint op2 = 0, guint op3 = 0);
/** Builds a new expression which reprenents a condition (or operation).
* @param op: type of condition
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]