Nux

Merge lp:~hikiko/nux/nux.fixed-smart-ptr into lp:nux

Proposed by Eleni Maria Stea on 2016-07-18
Status: Merged
Approved by: Marco Trevisan (Treviño) on 2016-12-08
Approved revision: 885
Merged at revision: 884
Proposed branch: lp:~hikiko/nux/nux.fixed-smart-ptr
Merge into: lp:nux
Diff against target: 110 lines (+9/-9)
6 files modified
Nux/TimerProc.h (+1/-0)
NuxCore/Logger.h (+2/-2)
NuxCore/LoggingWriter.cpp (+1/-1)
NuxCore/PropertyAnimation.h (+3/-4)
autogen.sh (+1/-2)
configure.ac (+1/-0)
To merge this branch: bzr merge lp:~hikiko/nux/nux.fixed-smart-ptr
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) 2016-07-18 Approve on 2016-12-08
PS Jenkins bot continuous-integration Pending
Review via email: mp+300293@code.launchpad.net

Commit message

replaced std::shared_ptr with boost::shared_ptr to fix compile errors

Description of the change

replaced std::shared_ptr with boost::shared_ptr to fix compile errors

To post a comment you must log in.
Marco Trevisan (Treviño) (3v1n0) wrote :

Using std ones is preferred. Please just include <memory>.

Eleni Maria Stea (hikiko) wrote :

It still doesn't compile in all systems if I just include <memory>. Added c++11 CXXFLAGS and replaced the boost smart pointers with std.

lp:~hikiko/nux/nux.fixed-smart-ptr updated on 2016-07-22
884. By Eleni Maria Stea on 2016-07-22

removed empty line (cleanup diff)

885. By Eleni Maria Stea on 2016-07-22

fixed diff

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nux/TimerProc.h'
2--- Nux/TimerProc.h 2015-07-28 10:47:57 +0000
3+++ Nux/TimerProc.h 2016-07-22 09:53:52 +0000
4@@ -23,6 +23,7 @@
5 #ifndef TIMERPROC_H
6 #define TIMERPROC_H
7
8+#include <memory>
9 namespace nux
10 {
11
12
13=== modified file 'NuxCore/Logger.h'
14--- NuxCore/Logger.h 2012-10-28 15:59:17 +0000
15+++ NuxCore/Logger.h 2016-07-22 09:53:52 +0000
16@@ -22,9 +22,9 @@
17 #ifndef NUX_CORE_LOGGER_H
18 #define NUX_CORE_LOGGER_H
19
20+#include <memory>
21 #include <ostream>
22 #include <string>
23-#include <boost/shared_ptr.hpp>
24
25 #if defined(NUX_OS_WINDOWS)
26 #define __func__ __FUNCTION__
27@@ -134,7 +134,7 @@
28
29
30 class LoggerModule;
31-typedef boost::shared_ptr<LoggerModule> LoggerModulePtr;
32+typedef std::shared_ptr<LoggerModule> LoggerModulePtr;
33
34 class Logger
35 {
36
37=== modified file 'NuxCore/LoggingWriter.cpp'
38--- NuxCore/LoggingWriter.cpp 2012-11-17 14:11:02 +0000
39+++ NuxCore/LoggingWriter.cpp 2016-07-22 09:53:52 +0000
40@@ -47,7 +47,7 @@
41
42 struct StreamWrapper
43 {
44- typedef boost::shared_ptr<StreamWrapper> Ptr;
45+ typedef std::shared_ptr<StreamWrapper> Ptr;
46
47 StreamWrapper(std::ostream& output) : out(output) {}
48 std::ostream& out;
49
50=== modified file 'NuxCore/PropertyAnimation.h'
51--- NuxCore/PropertyAnimation.h 2012-07-13 05:24:25 +0000
52+++ NuxCore/PropertyAnimation.h 2016-07-22 09:53:52 +0000
53@@ -22,23 +22,22 @@
54 #ifndef NUX_CORE_PROPERTY_ANIMATION_H
55 #define NUX_CORE_PROPERTY_ANIMATION_H
56
57+#include <memory>
58 #include "Animation.h"
59 #include "Property.h"
60
61-#include <boost/shared_ptr.hpp>
62-
63 namespace nux
64 {
65 namespace animation
66 {
67
68 template <typename T>
69-boost::shared_ptr<AnimateValue<T>> animate_property(Property<T>& prop,
70+std::shared_ptr<AnimateValue<T>> animate_property(Property<T>& prop,
71 T const& start,
72 T const& finish,
73 int ms_duration)
74 {
75- boost::shared_ptr<AnimateValue<T> > anim(new AnimateValue<T>(start, finish, ms_duration));
76+ std::shared_ptr<AnimateValue<T> > anim(new AnimateValue<T>(start, finish, ms_duration));
77 anim->updated.connect([&prop](T const& v) { prop = v; });
78 return anim;
79 }
80
81=== modified file 'autogen.sh'
82--- autogen.sh 2010-11-17 14:44:35 +0000
83+++ autogen.sh 2016-07-22 09:53:52 +0000
84@@ -2,13 +2,12 @@
85
86 srcdir=`dirname $0`
87
88-PKG_NAME="Nux"
89+#PKG_NAME="Nux"
90
91 which gnome-autogen.sh || {
92 echo "You need gnome-common from GNOME SVN"
93 exit 1
94 }
95
96-USE_GNOME2_MACROS=1 \
97 . gnome-autogen.sh
98
99
100=== modified file 'configure.ac'
101--- configure.ac 2015-09-16 04:26:40 +0000
102+++ configure.ac 2016-07-22 09:53:52 +0000
103@@ -93,6 +93,7 @@
104 dnl ===========================================================================
105
106 # Checks for programs
107+AM_CXXFLAGS-"$CXXFLAGS -std=c++0x"
108 AC_PROG_CC_C99
109 AC_PROG_CXX
110 AM_PROG_CC_C_O

Subscribers

People subscribed via source and target branches