From 4e94f508319aea60078c02a9c55ff1e050fb7025 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 11 Feb 2015 16:15:26 +0200 Subject: Rearrange inline function order to help MinGW On MinGW, if a DLL-exported inline function is called before it is known to be inline, the compiler issues a warning. --- odb/oracle/statement.hxx | 31 ++++++++++++++++++++++++++++--- odb/oracle/statement.ixx | 37 ------------------------------------- 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_; - } } } -- cgit v1.1