aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-02-11 16:15:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-02-11 16:15:26 +0200
commit4e94f508319aea60078c02a9c55ff1e050fb7025 (patch)
treee277a876e18ebabeff632c850b0ed814c2d5ecca
parentc93c64934ab5d5f05201909d674b97ecf7ddc1ed (diff)
Rearrange inline function order to help MinGW2.4.0
On MinGW, if a DLL-exported inline function is called before it is known to be inline, the compiler issues a warning.
-rw-r--r--odb/oracle/statement.hxx31
-rw-r--r--odb/oracle/statement.ixx37
2 files changed, 28 insertions, 40 deletions
diff --git a/odb/oracle/statement.hxx b/odb/oracle/statement.hxx
index ee2e21f..a008f6f 100644
--- a/odb/oracle/statement.hxx
+++ b/odb/oracle/statement.hxx
@@ -314,7 +314,19 @@ namespace odb
// All other errors are reported via exceptions.
//
bool
- result (std::size_t i);
+ result (std::size_t i)
+ {
+ // Get to the next parameter set if necessary.
+ //
+ if (i != i_)
+ {
+ mex_->current (++i_); // mex cannot be NULL since this is a batch.
+ fetch (status_[i_] == 0 ? 0 /*OCI_SUCCESS*/ : -1 /*OCI_ERROR*/,
+ status_[i_]);
+ }
+
+ return result_;
+ }
bool
execute ()
@@ -406,7 +418,13 @@ namespace odb
using bulk_statement::result_unknown;
unsigned long long
- result (std::size_t i);
+ result (std::size_t i)
+ {
+ if (i != i_)
+ mex_->current (++i_); // mex cannot be NULL since this is a batch.
+
+ return result_;
+ }
unsigned long long
execute ()
@@ -484,7 +502,14 @@ namespace odb
using bulk_statement::result_unknown;
unsigned long long
- result (std::size_t i);
+ result (std::size_t i)
+ {
+ if (i != i_)
+ mex_->current (++i_); // mex cannot be NULL since this is a batch.
+
+ return result_;
+ }
+
unsigned long long
execute ()
diff --git a/odb/oracle/statement.ixx b/odb/oracle/statement.ixx
index 107f517..e83d41b 100644
--- a/odb/oracle/statement.ixx
+++ b/odb/oracle/statement.ixx
@@ -59,42 +59,5 @@ namespace odb
}
}
}
-
- inline bool insert_statement::
- result (std::size_t i)
- {
- // Get to the next parameter set if necessary.
- //
- if (i != i_)
- {
- mex_->current (++i_); // mex cannot be NULL since this is a batch.
- fetch (status_[i_] == 0 ? 0 /*OCI_SUCCESS*/ : -1 /*OCI_ERROR*/,
- status_[i_]);
- }
-
- return result_;
- }
-
- // update_statement
- //
- inline unsigned long long update_statement::
- result (std::size_t i)
- {
- if (i != i_)
- mex_->current (++i_); // mex cannot be NULL since this is a batch.
-
- return result_;
- }
-
- // delete_statement
- //
- inline unsigned long long delete_statement::
- result (std::size_t i)
- {
- if (i != i_)
- mex_->current (++i_); // mex cannot be NULL since this is a batch.
-
- return result_;
- }
}
}