Mir

Merge lp:~brandontschaefer/mir/replace-deprecated-auto-ptr into lp:~mir-team/mir/trunk

Proposed by Brandon Schaefer
Status: Merged
Approved by: Kevin DuBois
Approved revision: no longer in the source branch.
Merged at revision: 589
Proposed branch: lp:~brandontschaefer/mir/replace-deprecated-auto-ptr
Merge into: lp:~mir-team/mir/trunk
Diff against target: 30 lines (+5/-3)
1 file modified
3rd_party/cucumber-cpp/include/cucumber-cpp/internal/connectors/wire/WireProtocolCommands.hpp (+5/-3)
To merge this branch: bzr merge lp:~brandontschaefer/mir/replace-deprecated-auto-ptr
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Kevin DuBois (community) Approve
Review via email: mp+158994@code.launchpad.net

Commit message

Replace std::auto_ptr with std::unique_ptr. As std::auto_ptr is deprecated.

Description of the change

Fixes compiling warning:
In file included from /home/bschaefer/src/mir/3rd_party/cucumber-cpp/src/connectors/wire/WireProtocolCommands.cpp:1:0:
/home/bschaefer/src/mir/3rd_party/cucumber-cpp/include/cucumber-cpp/internal/connectors/wire/WireProtocolCommands.hpp:47:55: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.7/backward/auto_ptr.h:87) [-Wdeprecated-declarations]
[ 66%] Building CXX object tests/unit-tests/CMakeFiles/unit-tests.dir/compositor/test_multi_threaded_compositor.cpp.o
In file included from /home/bschaefer/src/mir/3rd_party/cucumber-cpp/src/connectors/wire/WireProtocol.cpp:2:0:
/home/bschaefer/src/mir/3rd_party/cucumber-cpp/include/cucumber-cpp/internal/connectors/wire/WireProtocolCommands.hpp:47:55: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.7/backward/auto_ptr.h:87) [-Wdeprecated-declarations]

The class template auto_ptr is deprecated. [ Note: The class template unique_ptr (20.9.10) provides a better solution. —end note ]

To post a comment you must log in.
Revision history for this message
Kevin DuBois (kdub) wrote :

seems good! thanks for the patch

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '3rd_party/cucumber-cpp/include/cucumber-cpp/internal/connectors/wire/WireProtocolCommands.hpp'
2--- 3rd_party/cucumber-cpp/include/cucumber-cpp/internal/connectors/wire/WireProtocolCommands.hpp 2013-01-03 21:26:48 +0000
3+++ 3rd_party/cucumber-cpp/include/cucumber-cpp/internal/connectors/wire/WireProtocolCommands.hpp 2013-04-15 18:53:28 +0000
4@@ -3,12 +3,14 @@
5
6 #include "WireProtocol.hpp"
7
8+#include <memory>
9+
10 namespace cuke {
11 namespace internal {
12
13 class ScenarioCommand : public WireCommand {
14 protected:
15- std::auto_ptr<const CukeEngine::tags_type> tags;
16+ std::unique_ptr<const CukeEngine::tags_type> tags;
17
18 ScenarioCommand(const CukeEngine::tags_type *tags);
19 };
20@@ -44,8 +46,8 @@
21 class InvokeCommand : public WireCommand {
22 private:
23 const std::string stepId;
24- std::auto_ptr<const CukeEngine::invoke_args_type> args;
25- std::auto_ptr<const CukeEngine::invoke_table_type> tableArg;
26+ std::unique_ptr<const CukeEngine::invoke_args_type> args;
27+ std::unique_ptr<const CukeEngine::invoke_table_type> tableArg;
28
29 public:
30 InvokeCommand(const std::string & stepId,

Subscribers

People subscribed via source and target branches