List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:January 11 2010 4:14pm
Subject:Re: mysqlpp::ScopedConnection
View as plain text  
Just some nits:

> +ScopedConnection::ScopedConnection(ConnectionPool& pool)
> +: pool_(pool), connection_(pool.grab())

Whitespace.  Mentioning it just in case you contribute another ctor some 
day. :)

> +Connection*
> +ScopedConnection::operator->() const
> +{
> + return connection_;
> +}
> +
> +Connection&
> +ScopedConnection::operator*() const
> +{
> + return *connection_;
> +}

My instinct would be to put these inline in the header, so the compiler 
can optimize away the function call.  Is there a reason not to do so?

> + /// Non-copyable
> + ScopedConnection(const ScopedConnection& no_copies);

The triple-slash comments are just to get Doxygen's attention, and it 
ignores private members as we have it configured in MySQL++.

Are we giving you, personally, the copyright mention in the header 
comments, and not Switchplane?  We did with examples/for_each.cpp, but 
I'm just checking that that is still okay.
Thread
Query::execute crashes without a connected driverJoel Fielder7 Jan
  • Re: Query::execute crashes without a connected driverWarren Young7 Jan
    • Re: Query::execute crashes without a connected driverJoel Fielder8 Jan
    • mysqlpp::ScopedConnectionJoel Fielder8 Jan
      • Re: mysqlpp::ScopedConnectionWarren Young9 Jan
        • Re: mysqlpp::ScopedConnectionJonathan Wakely9 Jan
          • Re: mysqlpp::ScopedConnectionJoel Fielder11 Jan
            • Re: mysqlpp::ScopedConnectionJonathan Wakely11 Jan
              • Re: mysqlpp::ScopedConnectionWarren Young11 Jan
                • Re: mysqlpp::ScopedConnectionJonathan Wakely11 Jan
    • Re: Query::execute crashes without a connected driverJoel Fielder13 Jan
      • Re: Query::execute crashes without a connected driverWarren Young13 Jan
Re: mysqlpp::ScopedConnectionJoel Fielder11 Jan
  • Re: mysqlpp::ScopedConnectionWarren Young11 Jan
    • Re: mysqlpp::ScopedConnectionJoel Fielder11 Jan
      • Re: mysqlpp::ScopedConnectionWarren Young11 Jan
        • Re: mysqlpp::ScopedConnectionJoel Fielder12 Jan