Joseph Artsimovich wrote:
>
> char*
> Query::preview_char()
> {
> std::string const str(sbuffer_.str());
> char* s = new char[str.size() + 1];
> memcpy(s, str.c_str(), str.size() + 1);
> }
This makes one more copy than is necessary. Please try the code
currently in svn, as it should accomplish the same end without the
double copy.
> 2. Connection copy constructor doesn't work, because it doesn't initialize
> is_connected_ member, which is then accessed here:
> -----------------------------------
> void
> Connection::copy(const Connection& other)
> {
> if (connected()) {
> disconnect();
> }
Thanks for letting me know. It should be fixed in svn now.