[niepce] Removed tr1 now that we use C++11
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce] Removed tr1 now that we use C++11
- Date: Sat, 8 Jun 2013 00:11:50 +0000 (UTC)
commit 8e2e91edc2d86fcda39c3401617c5da4d097b9c2
Author: Hubert Figuière <hub figuiere net>
Date: Wed Jun 5 22:07:11 2013 -0400
Removed tr1 now that we use C++11
src/engine/db/fsfile.hpp | 6 ++--
src/engine/db/keyword.hpp | 12 +++---
src/engine/db/label.hpp | 9 ++---
src/engine/db/libfile.hpp | 12 +++---
src/engine/db/libfolder.hpp | 8 ++--
src/engine/db/libmetadata.hpp | 13 ++++---
src/engine/db/storage.hpp | 6 ++--
src/fwk/base/colour.hpp | 6 ++--
src/fwk/base/geometry.hpp | 14 ++++----
src/fwk/base/propertybag.hpp | 10 +++---
src/fwk/toolkit/application.cpp | 1 -
src/fwk/toolkit/frame.cpp | 1 -
src/fwk/toolkit/notification.hpp | 6 ++--
src/fwk/utils/boost.hpp | 44 ++-----------------------
src/fwk/utils/db/iconnectiondriver.hpp | 8 ++--
src/fwk/utils/db/iconnectionmanagerdriver.hpp | 2 +-
src/fwk/utils/files.cpp | 4 +-
src/fwk/utils/files.hpp | 10 +++---
src/fwk/utils/gphoto.hpp | 6 ++--
src/ncr/image.hpp | 8 ++--
src/niepce/ui/dialogs/importdialog.hpp | 5 ++-
src/niepce/ui/niepcewindow.cpp | 3 +-
src/niepce/ui/thumbstripview.cpp | 2 +-
src/niepce/ui/workspacecontroller.cpp | 4 +-
24 files changed, 80 insertions(+), 120 deletions(-)
---
diff --git a/src/engine/db/fsfile.hpp b/src/engine/db/fsfile.hpp
index 1b45fcb..4d6437d 100644
--- a/src/engine/db/fsfile.hpp
+++ b/src/engine/db/fsfile.hpp
@@ -1,7 +1,7 @@
/*
* niepce - eng/db/fsfile.hpp
*
- * Copyright (C) 2009 Hubert Figuiere
+ * Copyright (C) 2009-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
#define __NIEPCE_DB_FSFILE_H__
#include <string>
-#include <tr1/memory>
+#include <memory>
#include "engine/db/librarytypes.hpp"
@@ -31,7 +31,7 @@ namespace eng {
class FsFile
{
public:
- typedef std::tr1::shared_ptr< FsFile > Ptr;
+ typedef std::shared_ptr< FsFile > Ptr;
FsFile(library_id_t id, const std::string & path);
diff --git a/src/engine/db/keyword.hpp b/src/engine/db/keyword.hpp
index 09686b6..67a5aba 100644
--- a/src/engine/db/keyword.hpp
+++ b/src/engine/db/keyword.hpp
@@ -1,7 +1,7 @@
/*
* niepce - eng/db/keyword.hpp
*
- * Copyright (C) 2007 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
#include <string>
#include <vector>
-#include <tr1/memory>
+#include <memory>
#include "engine/db/librarytypes.hpp"
@@ -32,16 +32,16 @@ namespace eng {
class Keyword
{
public:
- typedef std::tr1::shared_ptr<Keyword> Ptr;
+ typedef std::shared_ptr<Keyword> Ptr;
typedef std::vector<Ptr> List;
- typedef std::tr1::shared_ptr<List> ListPtr;
+ typedef std::shared_ptr<List> ListPtr;
typedef std::vector<int> IdList;
Keyword(library_id_t id, const std::string & keyword);
-
+
library_id_t id() const
{ return m_id; }
- const std::string & keyword()
+ const std::string & keyword()
{ return m_keyword; }
private:
library_id_t m_id;
diff --git a/src/engine/db/label.hpp b/src/engine/db/label.hpp
index 79f4f1a..f04ba24 100644
--- a/src/engine/db/label.hpp
+++ b/src/engine/db/label.hpp
@@ -1,7 +1,7 @@
/*
* niepce - engine/db/label.hpp
*
- * Copyright (C) 2009 Hubert Figuiere
+ * Copyright (C) 2009-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,8 +23,7 @@
#include <string>
#include <vector>
-
-#include <tr1/memory>
+#include <memory>
#include "fwk/base/colour.hpp"
#include "engine/db/librarytypes.hpp"
@@ -37,9 +36,9 @@ namespace eng {
class Label
{
public:
- typedef std::tr1::shared_ptr<Label> Ptr;
+ typedef std::shared_ptr<Label> Ptr;
typedef std::vector<Ptr> List;
- typedef std::tr1::shared_ptr<List> ListPtr;
+ typedef std::shared_ptr<List> ListPtr;
Label(library_id_t _id, const std::string & _label, const std::string & _colourstring)
: m_id(_id), m_label(_label)
diff --git a/src/engine/db/libfile.hpp b/src/engine/db/libfile.hpp
index 7b1c357..e64becb 100644
--- a/src/engine/db/libfile.hpp
+++ b/src/engine/db/libfile.hpp
@@ -1,7 +1,7 @@
/*
* niepce - eng/db/libfile.h
*
- * Copyright (C) 2007-2009 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
#include <string>
#include <list>
-#include <tr1/memory>
+#include <memory>
#include "fwk/toolkit/mimetype.hpp"
#include "fwk/base/propertybag.hpp"
@@ -37,10 +37,10 @@ namespace eng {
class LibFile
{
public:
- typedef std::tr1::shared_ptr< LibFile > Ptr;
- typedef std::tr1::weak_ptr< LibFile> WeakPtr;
+ typedef std::shared_ptr< LibFile > Ptr;
+ typedef std::weak_ptr< LibFile> WeakPtr;
typedef std::list< Ptr > List;
- typedef std::tr1::shared_ptr< List > ListPtr;
+ typedef std::shared_ptr< List > ListPtr;
enum FileType {
FILE_TYPE_UNKNOWN = 0,
@@ -52,7 +52,7 @@ public:
static FileType mimetype_to_filetype(fwk::MimeType mime);
- LibFile(library_id_t id, library_id_t folderId, library_id_t fsfileid,
+ LibFile(library_id_t id, library_id_t folderId, library_id_t fsfileid,
const std::string & p,
const std::string & name );
virtual ~LibFile();
diff --git a/src/engine/db/libfolder.hpp b/src/engine/db/libfolder.hpp
index 3049b12..d2de891 100644
--- a/src/engine/db/libfolder.hpp
+++ b/src/engine/db/libfolder.hpp
@@ -1,7 +1,7 @@
/*
* niepce - eng/db/libfolder.hpp
*
- * Copyright (C) 2007, 2011 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
#include <string>
#include <list>
-#include <tr1/memory>
+#include <memory>
#include "engine/db/librarytypes.hpp"
#include "fwk/utils/db/iconnectiondriver.hpp"
@@ -34,9 +34,9 @@ namespace eng {
class LibFolder
{
public:
- typedef std::tr1::shared_ptr< LibFolder > Ptr;
+ typedef std::shared_ptr< LibFolder > Ptr;
typedef std::list< Ptr > List;
- typedef std::tr1::shared_ptr< List > ListPtr;
+ typedef std::shared_ptr< List > ListPtr;
typedef enum {
VIRTUAL_NONE = 0,
VIRTUAL_TRASH = 1,
diff --git a/src/engine/db/libmetadata.hpp b/src/engine/db/libmetadata.hpp
index 4ac7dd1..680236c 100644
--- a/src/engine/db/libmetadata.hpp
+++ b/src/engine/db/libmetadata.hpp
@@ -1,7 +1,7 @@
/*
* niepce - eng/db/libmetadata.hpp
*
- * Copyright (C) 2008 Hubert Figuiere
+ * Copyright (C) 2008-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,7 +22,8 @@
#include <vector>
#include <string>
-#include <tr1/memory>
+#include <memory>
+
#include <boost/any.hpp>
#include "fwk/base/propertybag.hpp"
@@ -36,16 +37,16 @@ class LibMetadata
: public fwk::XmpMeta
{
public:
- typedef std::tr1::shared_ptr<LibMetadata> Ptr;
-
+ typedef std::shared_ptr<LibMetadata> Ptr;
+
LibMetadata(library_id_t _id);
-
+
library_id_t id() const
{ return m_id; }
bool setMetaData(fwk::PropertyIndex meta, const fwk::PropertyValue & value);
bool getMetaData(fwk::PropertyIndex meta, fwk::PropertyValue & value) const;
- /** convert XMP to a set of properties
+ /** convert XMP to a set of properties
* @param propset the property set requested
* @param props the output properties
*/
diff --git a/src/engine/db/storage.hpp b/src/engine/db/storage.hpp
index 88e0232..55116c2 100644
--- a/src/engine/db/storage.hpp
+++ b/src/engine/db/storage.hpp
@@ -1,7 +1,7 @@
/*
* niepce - eng/db/storage.hpp
*
- * Copyright (C) 2007 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
#ifndef __NIEPCE_LIBRARY_STORAGE_H__
#define __NIEPCE_LIBRARY_STORAGE_H__
-#include <tr1/memory>
+#include <memory>
#include "engine/db/keyword.hpp"
@@ -31,7 +31,7 @@ namespace eng {
class Storage
{
public:
- typedef std::tr1::shared_ptr<Storage> Ptr;
+ typedef std::shared_ptr<Storage> Ptr;
virtual ~Storage();
diff --git a/src/fwk/base/colour.hpp b/src/fwk/base/colour.hpp
index 8aedd52..ecb6fed 100644
--- a/src/fwk/base/colour.hpp
+++ b/src/fwk/base/colour.hpp
@@ -1,7 +1,7 @@
/*
* niepce - fwk/base/colour.hpp
*
- * Copyright (C) 2009 Hubert Figuiere
+ * Copyright (C) 2009-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
#include <stdint.h>
#include <string>
-#include <tr1/array>
+#include <array>
namespace fwk {
@@ -33,7 +33,7 @@ namespace fwk {
* To be used only for UI.
*/
class RgbColour
- : public std::tr1::array<uint16_t, 3>
+ : public std::array<uint16_t, 3>
{
public:
RgbColour(value_type r = 0, value_type g = 0, value_type b = 0);
diff --git a/src/fwk/base/geometry.hpp b/src/fwk/base/geometry.hpp
index f598a6f..e238929 100644
--- a/src/fwk/base/geometry.hpp
+++ b/src/fwk/base/geometry.hpp
@@ -1,7 +1,7 @@
/*
* niepce - fwk/base/geometry.h
*
- * Copyright (C) 2007 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
#define __FWK_BASE_GEOMETRY_H__
#include <exception>
-#include <tr1/array>
+#include <array>
#include <string>
#include <boost/lexical_cast.hpp>
@@ -34,14 +34,14 @@ class Rect
public:
Rect();
Rect(int x, int y, int w, int h);
- /** build a Rect from a string
+ /** build a Rect from a string
* @param s string whose format is "x y w h" as decimal ints.
* @throw a std::bad_cast exception if there is not 4 element
* or if one of them is not an int.
*/
- Rect(const std::string & s)
+ Rect(const std::string & s)
throw(std::bad_cast);
-
+
int x() const
{ return _r[X]; }
int y() const
@@ -70,9 +70,9 @@ private:
X = 0,
Y,
W,
- H
+ H
};
- std::tr1::array<int, 4> _r;
+ std::array<int, 4> _r;
};
}
diff --git a/src/fwk/base/propertybag.hpp b/src/fwk/base/propertybag.hpp
index 358fa69..bc6ddfb 100644
--- a/src/fwk/base/propertybag.hpp
+++ b/src/fwk/base/propertybag.hpp
@@ -1,7 +1,7 @@
/*
* niepce - fwk/base/propertybag.cpp
*
- * Copyright (C) 2011-2012 Hubert Figuiere
+ * Copyright (C) 2011-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
#include <vector>
#include <map>
#include <set>
-#include <tr1/memory>
+#include <memory>
#include <boost/variant.hpp>
#include "fwk/base/date.hpp"
@@ -38,14 +38,14 @@ typedef boost::variant<int, std::string, StringArray, Date> PropertyValue;
typedef std::set<PropertyIndex> PropertySet;
-/** a property bag
+/** a property bag
* It is important that the values for PropertyIndex be properly name spaced
* by the caller.
*/
class PropertyBag
{
public:
- typedef std::tr1::shared_ptr<PropertyBag> Ptr;
+ typedef std::shared_ptr<PropertyBag> Ptr;
typedef std::map<PropertyIndex, PropertyValue> _Map;
typedef _Map::const_iterator const_iterator;
@@ -53,7 +53,7 @@ public:
{
return m_bag.empty();
}
-
+
const_iterator begin() const
{
return m_bag.begin();
diff --git a/src/fwk/toolkit/application.cpp b/src/fwk/toolkit/application.cpp
index c0993ee..88c07ed 100644
--- a/src/fwk/toolkit/application.cpp
+++ b/src/fwk/toolkit/application.cpp
@@ -27,7 +27,6 @@
#include <gtkmm/settings.h>
#include "fwk/base/debug.hpp"
-//#include "fwk/utils/boost.hpp"
#include "fwk/utils/modulemanager.hpp"
#include "application.hpp"
#include "uicontroller.hpp"
diff --git a/src/fwk/toolkit/frame.cpp b/src/fwk/toolkit/frame.cpp
index 36788ad..bc240c3 100644
--- a/src/fwk/toolkit/frame.cpp
+++ b/src/fwk/toolkit/frame.cpp
@@ -27,7 +27,6 @@
#include "fwk/base/debug.hpp"
#include "fwk/base/geometry.hpp"
-#include "fwk/utils/boost.hpp"
#include "frame.hpp"
#include "application.hpp"
diff --git a/src/fwk/toolkit/notification.hpp b/src/fwk/toolkit/notification.hpp
index 4c8c4ba..6c35932 100644
--- a/src/fwk/toolkit/notification.hpp
+++ b/src/fwk/toolkit/notification.hpp
@@ -1,7 +1,7 @@
/*
* niepce - fwk/notification.h
*
- * Copyright (C) 2007-2009 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
#ifndef __FWK_NOTIFICATION_H__
#define __FWK_NOTIFICATION_H__
-#include <tr1/memory>
+#include <memory>
#include <boost/any.hpp>
#include <glibmm/threads.h>
@@ -35,7 +35,7 @@ namespace fwk {
class Notification
{
public:
- typedef std::tr1::shared_ptr<Notification> Ptr;
+ typedef std::shared_ptr<Notification> Ptr;
typedef Glib::Threads::RecMutex mutex_t;
Notification(int _type)
diff --git a/src/fwk/utils/boost.hpp b/src/fwk/utils/boost.hpp
index 1ef711c..f43cd2b 100644
--- a/src/fwk/utils/boost.hpp
+++ b/src/fwk/utils/boost.hpp
@@ -1,7 +1,7 @@
/*
- * niepce - utils/boost.h
+ * niepce - utils/boost.hpp
*
- * Copyright (C) 2007-2009 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,15 +22,11 @@
#ifndef _UTILS_BOOST_H_
#define _UTILS_BOOST_H_
-#include <tr1/memory>
-#include <boost/bind.hpp>
-#include <boost/function.hpp>
-
#include <glibmm/refptr.h>
namespace Glib {
- /** Dereference Glib::RefPtr<> for use in boost::bind */
+ /** Dereference Glib::RefPtr<> for use in std::bind */
template< class T_CppObject > inline
T_CppObject *get_pointer(const Glib::RefPtr< T_CppObject >& p)
{
@@ -39,40 +35,6 @@ namespace Glib {
}
-
-namespace std {
-namespace tr1 {
-
-template< class T_CppObject > inline
-T_CppObject *get_pointer(const shared_ptr< T_CppObject > &p)
-{
- return p.get();
-}
-
-
-}
-}
-
-namespace fwk {
-
-/** function to make a shared_ptr<> form a weak_ptr<>
- * idea from http://lists.boost.org/boost-users/2007/01/24384.php
- */
-template<class T>
-std::tr1::shared_ptr<T> shared_ptr_from( std::tr1::weak_ptr<T> const & wpt )
-{
- return std::tr1::shared_ptr<T>( wpt ); // throws on wpt.expired()
-}
-
-}
-
-/** need to convert a weak_ptr<> to a shared_ptr<> in the bind()
- * this allow breaking some circular references.
- */
-#define BIND_SHARED_PTR(_type, _spt) \
- boost::bind(&fwk::shared_ptr_from<_type>, std::tr1::weak_ptr<_type>(_spt))
-
-
#endif
/*
Local Variables:
diff --git a/src/fwk/utils/db/iconnectiondriver.hpp b/src/fwk/utils/db/iconnectiondriver.hpp
index a5a9bec..fbfec83 100644
--- a/src/fwk/utils/db/iconnectiondriver.hpp
+++ b/src/fwk/utils/db/iconnectiondriver.hpp
@@ -27,9 +27,9 @@
#define __NEMIVER_I_CONNECTION_DRIVER_H__
#include <stdint.h>
-#include <tr1/memory>
-#include <boost/function.hpp>
+#include <memory>
+#include <functional>
namespace fwk {
class Buffer ;
@@ -54,9 +54,9 @@ class SQLStatement;
class IConnectionDriver {
public:
- typedef std::tr1::shared_ptr<IConnectionDriver> Ptr;
+ typedef std::shared_ptr<IConnectionDriver> Ptr;
- typedef boost::function<void (void)> f0_t;
+ typedef std::function<void (void)> f0_t;
virtual ~IConnectionDriver ()
{}
diff --git a/src/fwk/utils/db/iconnectionmanagerdriver.hpp b/src/fwk/utils/db/iconnectionmanagerdriver.hpp
index 404d04a..81bda3a 100644
--- a/src/fwk/utils/db/iconnectionmanagerdriver.hpp
+++ b/src/fwk/utils/db/iconnectionmanagerdriver.hpp
@@ -89,7 +89,7 @@ public:
class IConnectionManagerDriver {
public:
- typedef std::tr1::shared_ptr<IConnectionManagerDriver> Ptr;
+ typedef std::shared_ptr<IConnectionManagerDriver> Ptr;
IConnectionManagerDriver()
{
}
diff --git a/src/fwk/utils/files.cpp b/src/fwk/utils/files.cpp
index 423058a..6a26247 100644
--- a/src/fwk/utils/files.cpp
+++ b/src/fwk/utils/files.cpp
@@ -1,7 +1,7 @@
/*
* niepce - fwk/utils/files.cpp
*
- * Copyright (C) 2007 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -57,7 +57,7 @@ namespace fwk {
{
}
- FileList::Ptr FileList::getFilesFromDirectory(const FileList::value_type & p, boost::function<bool
(const Glib::RefPtr<Gio::FileInfo> &)> filter)
+ FileList::Ptr FileList::getFilesFromDirectory(const FileList::value_type & p, std::function<bool
(const Glib::RefPtr<Gio::FileInfo> &)> filter)
{
// if(!exists( p ) ) {
// DBG_OUT( "directory %s do not exist", p.c_str() );
diff --git a/src/fwk/utils/files.hpp b/src/fwk/utils/files.hpp
index 0192828..0ef96f4 100644
--- a/src/fwk/utils/files.hpp
+++ b/src/fwk/utils/files.hpp
@@ -1,7 +1,7 @@
/*
* niepce - fwk/utils/files.hpp
*
- * Copyright (C) 2007 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,9 +25,9 @@
#include <list>
#include <string>
-#include <tr1/memory>
+#include <memory>
-#include <boost/function.hpp>
+#include <functional>
#include <giomm/fileinfo.h>
@@ -42,7 +42,7 @@ namespace fwk {
: private std::list< std::string >
{
public:
- typedef std::tr1::shared_ptr< FileList > Ptr;
+ typedef std::shared_ptr< FileList > Ptr;
typedef std::list< std::string > _impltype_t;
typedef _impltype_t::value_type value_type;
@@ -55,7 +55,7 @@ namespace fwk {
FileList( const _impltype_t & );
static Ptr getFilesFromDirectory(const value_type & dir,
- boost::function<bool (const
Glib::RefPtr<Gio::FileInfo> &)> filter);
+ std::function<bool (const Glib::RefPtr<Gio::FileInfo> &)>
filter);
const_iterator begin() const
{ return _impltype_t::begin(); }
diff --git a/src/fwk/utils/gphoto.hpp b/src/fwk/utils/gphoto.hpp
index 79cdc86..d9bb1ad 100644
--- a/src/fwk/utils/gphoto.hpp
+++ b/src/fwk/utils/gphoto.hpp
@@ -1,7 +1,7 @@
/*
* niepce - fwk/utils/gphoto.cpp
*
- * Copyright (C) 2009 Hubert Figuiere
+ * Copyright (C) 2009-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
#include <list>
#include <string>
-#include <tr1/memory>
+#include <memory>
#include <boost/noncopyable.hpp>
@@ -40,7 +40,7 @@ class GpDevice
: public boost::noncopyable
{
public:
- typedef std::tr1::shared_ptr<GpDevice> Ptr;
+ typedef std::shared_ptr<GpDevice> Ptr;
GpDevice(const std::string & model, const std::string & path);
diff --git a/src/ncr/image.hpp b/src/ncr/image.hpp
index 0d6e757..ee85c12 100644
--- a/src/ncr/image.hpp
+++ b/src/ncr/image.hpp
@@ -1,7 +1,7 @@
/*
* niepce - ncr/image.h
*
- * Copyright (C) 2008-2009 Hubert Figuiere
+ * Copyright (C) 2008-2013 Hubert Figuiere
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -23,17 +23,17 @@
#ifndef _NCR_IMAGE_H_
#define _NCR_IMAGE_H_
-#include <tr1/memory>
+#include <memory>
#include <gdkmm/pixbuf.h>
namespace ncr {
class Image
-// : public std::tr1::enable_shared_from_this<Image>
+// : public std::enable_shared_from_this<Image>
{
public:
- typedef std::tr1::shared_ptr<Image> Ptr;
+ typedef std::shared_ptr<Image> Ptr;
typedef enum {
STATUS_UNSET,
STATUS_LOADING,
diff --git a/src/niepce/ui/dialogs/importdialog.hpp b/src/niepce/ui/dialogs/importdialog.hpp
index 3b5ebbc..d3fad3d 100644
--- a/src/niepce/ui/dialogs/importdialog.hpp
+++ b/src/niepce/ui/dialogs/importdialog.hpp
@@ -1,7 +1,7 @@
/*
* niepce - niepce/ui/dialogs/importdialog.h
*
- * Copyright (C) 2008-2009 Hubert Figuiere
+ * Copyright (C) 2008-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@
#define __UI_IMPORTDIALOG_H__
#include <list>
+#include <memory>
#include <string>
#include <glibmm/refptr.h>
@@ -45,7 +46,7 @@ class ImportDialog
: public fwk::Dialog
{
public:
- typedef std::tr1::shared_ptr<ImportDialog> Ptr;
+ typedef std::shared_ptr<ImportDialog> Ptr;
ImportDialog();
diff --git a/src/niepce/ui/niepcewindow.cpp b/src/niepce/ui/niepcewindow.cpp
index 937250c..0a3da5d 100644
--- a/src/niepce/ui/niepcewindow.cpp
+++ b/src/niepce/ui/niepcewindow.cpp
@@ -1,7 +1,7 @@
/*
* niepce - ui/niepcewindow.cpp
*
- * Copyright (C) 2007-2009 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,7 +18,6 @@
*/
#include <string>
-#include <boost/bind.hpp>
#include <glibmm/i18n.h>
#include <gtkmm/window.h>
diff --git a/src/niepce/ui/thumbstripview.cpp b/src/niepce/ui/thumbstripview.cpp
index fce3259..c9e4240 100644
--- a/src/niepce/ui/thumbstripview.cpp
+++ b/src/niepce/ui/thumbstripview.cpp
@@ -1,7 +1,7 @@
/* Eye Of Gnome - Thumbnail View
*
* Copyright (C) 2006 The Free Software Foundation
- * Copyright (C) 2007-2009 Hubert Figuiere
+ * Copyright (C) 2007-2013 Hubert Figuiere
*
* C++-ization: Hubert Figuiere <hub figuiere net>
* Original Author: Claudio Saavedra <csaavedra alumnos utalca cl>
diff --git a/src/niepce/ui/workspacecontroller.cpp b/src/niepce/ui/workspacecontroller.cpp
index 41b127a..43bbdbd 100644
--- a/src/niepce/ui/workspacecontroller.cpp
+++ b/src/niepce/ui/workspacecontroller.cpp
@@ -93,7 +93,7 @@ void WorkspaceController::on_lib_notification(const eng::LibNotification &ln)
{
eng::Keyword::Ptr k
= boost::any_cast<eng::Keyword::Ptr>(ln.param);
- DBG_ASSERT(k, "keyword must not be NULL");
+ DBG_ASSERT(static_cast<bool>(k), "keyword must not be NULL");
add_keyword_item(k);
break;
}
@@ -101,7 +101,7 @@ void WorkspaceController::on_lib_notification(const eng::LibNotification &ln)
{
eng::Keyword::ListPtr l
= boost::any_cast<eng::Keyword::ListPtr>(ln.param);
- DBG_ASSERT(l, "keyword list must not be NULL");
+ DBG_ASSERT(static_cast<bool>(l), "keyword list must not be NULL");
for_each(l->begin(), l->end(),
boost::bind(&WorkspaceController::add_keyword_item,
this, _1));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]