From c83733757b74b0897b294d1368a0f8a0abe49184 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 21 Mar 2011 11:47:50 +0200 Subject: Cosmetic changes --- odb/mysql/error.cxx | 7 ++++--- odb/mysql/exceptions.cxx | 5 +---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/odb/mysql/error.cxx b/odb/mysql/error.cxx index 4700d12..32493f2 100644 --- a/odb/mysql/error.cxx +++ b/odb/mysql/error.cxx @@ -3,7 +3,8 @@ // copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file -#include // std::bad_alloc +#include // std::bad_alloc +#include #include #include @@ -18,8 +19,8 @@ namespace odb void translate_error (connection& c, unsigned int e, - const std::string& sqlstate, - const std::string& message) + const string& sqlstate, + const string& message) { switch (e) { diff --git a/odb/mysql/exceptions.cxx b/odb/mysql/exceptions.cxx index dd9e199..458bb8c 100644 --- a/odb/mysql/exceptions.cxx +++ b/odb/mysql/exceptions.cxx @@ -24,11 +24,8 @@ namespace odb database_exception:: database_exception (unsigned int e, const string& s, const string& m) - : error_ (e) + : error_ (e), sqlstate_ (s), message_ (m) { - sqlstate_ = s; - message_ = m; - ostringstream ostr; ostr << error_ << " (" << sqlstate_ << "): " << message_; what_ = ostr.str (); -- cgit v1.1