~mysql/mysql-connector-cpp/trunk

« back to all changes in this revision

Viewing changes to driver/mysql_resultbind.cpp

  • Committer: Hemant Dangi
  • Date: 2014-12-17 16:28:39 UTC
  • Revision ID: hemant.dangi@oracle.com-20141217162839-sdbpj3fcwn5gxjxh
Bug #75251: Add C++11 support and replace (deprecated in C++11) auto_ptr

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
2
Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
3
3
 
4
4
The MySQL Connector/C++ is licensed under the terms of the GPLv2
5
5
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
35
35
 
36
36
#include <string.h>
37
37
 
 
38
#include <boost/scoped_ptr.hpp>
 
39
 
38
40
namespace sql
39
41
{
40
42
namespace mysql
159
161
        len.reset(new unsigned long[num_fields]);
160
162
        memset(len.get(), 0, sizeof(unsigned long) * num_fields);
161
163
 
162
 
        std::auto_ptr< NativeAPI::NativeResultsetWrapper > resultMeta(proxy->result_metadata());
 
164
        boost::scoped_ptr< NativeAPI::NativeResultsetWrapper > resultMeta(proxy->result_metadata());
163
165
 
164
166
        for (unsigned int i = 0; i < num_fields; ++i) {
165
167
                MYSQL_FIELD * field = resultMeta->fetch_field();