From 6d0a6fb0566d8270133ecda355f167124686f24f 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/mssql/statement.hxx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'odb/mssql/statement.hxx') diff --git a/odb/mssql/statement.hxx b/odb/mssql/statement.hxx index 8798a3c..516ce7b 100644 --- a/odb/mssql/statement.hxx +++ b/odb/mssql/statement.hxx @@ -429,7 +429,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 () @@ -516,7 +522,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 () -- cgit v1.1