From 7be70aab59051aa358547a3e530cc95490c04232 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 17 Apr 2014 14:19:55 -0500 Subject: Require the use of C++11 --- src/journal.cc | 5 ++--- src/system.hh.in | 2 -- src/utils.h | 4 ---- 3 files changed, 2 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/journal.cc b/src/journal.cc index 2512664f..804c9ee2 100644 --- a/src/journal.cc +++ b/src/journal.cc @@ -409,10 +409,9 @@ bool journal_t::add_xact(xact_t * xact) foreach (post_t * post, xact->posts) { account_t * acct = post->account; if (acct->deferred_posts) { - deferred_posts_map_t::iterator - i = acct->deferred_posts->find(uuid); + auto i = acct->deferred_posts->find(uuid); if (i != acct->deferred_posts->end()) { - foreach (post_t * rpost, (*i).second) + for (post_t * rpost : (*i).second) if (acct == rpost->account) acct->add_post(rpost); acct->deferred_posts->erase(i); diff --git a/src/system.hh.in b/src/system.hh.in index 952411f9..8f501587 100644 --- a/src/system.hh.in +++ b/src/system.hh.in @@ -56,8 +56,6 @@ #define Ledger_VERSION_PATCH @Ledger_VERSION_PATCH@ #define Ledger_VERSION_DATE @Ledger_VERSION_DATE@ -#define HAVE_CXX11 @HAVE_CXX11@ - #define HAVE_EDIT @HAVE_EDIT@ #define HAVE_GETTEXT @HAVE_GETTEXT@ diff --git a/src/utils.h b/src/utils.h index 95cc64fd..c3dcf562 100644 --- a/src/utils.h +++ b/src/utils.h @@ -485,11 +485,7 @@ inline void check_for_signal() { /*@{*/ #define foreach BOOST_FOREACH -#if HAVE_CXX11 using std::unique_ptr; -#else -#define unique_ptr std::auto_ptr -#endif namespace ledger { -- cgit v1.2.3