Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: include/AdblockPlus/FilterEngine.h

Issue 5163715573841920: Issue 768 - Switch from TR1 to C++11 (Closed)
Patch Set: rebase Created Aug. 5, 2015, 10:38 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: include/AdblockPlus/FilterEngine.h
diff --git a/include/AdblockPlus/FilterEngine.h b/include/AdblockPlus/FilterEngine.h
index 6cebaa70b4b921cf3d6ea5ce97723ca22689bc2d..ffae6eb057bce6633165d33510d64def48d20a0f 100644
--- a/include/AdblockPlus/FilterEngine.h
+++ b/include/AdblockPlus/FilterEngine.h
@@ -26,8 +26,6 @@
#include <AdblockPlus/JsValue.h>
#include <AdblockPlus/Notification.h>
-#include "tr1_memory.h"
-
namespace AdblockPlus
{
class FilterEngine;
@@ -39,7 +37,7 @@ namespace AdblockPlus
* use `GetProperty()` to retrieve them by name.
*/
class Filter : public JsValue,
- public std::tr1::enable_shared_from_this<Filter>
+ public std::enable_shared_from_this<Filter>
Felix Dahlke 2015/08/05 21:28:04 Nit: This was wrapped because it didn't fit in 80
Wladimir Palant 2015/08/06 12:24:54 Sergei didn't address this nit and I think he is r
Felix Dahlke 2015/08/06 18:19:01 Oh, I wasn't aware of that, fair enough.
{
public:
/**
@@ -89,7 +87,7 @@ namespace AdblockPlus
* use `GetProperty()` to retrieve them by name.
*/
class Subscription : public JsValue,
- public std::tr1::enable_shared_from_this<Subscription>
+ public std::enable_shared_from_this<Subscription>
{
public:
/**
@@ -134,12 +132,12 @@ namespace AdblockPlus
/**
* Shared smart pointer to a `Filter` instance.
*/
- typedef std::tr1::shared_ptr<Filter> FilterPtr;
+ typedef std::shared_ptr<Filter> FilterPtr;
/**
* Shared smart pointer to a `Subscription` instance.
*/
- typedef std::tr1::shared_ptr<Subscription> SubscriptionPtr;
+ typedef std::shared_ptr<Subscription> SubscriptionPtr;
/**
* Main component of libadblockplus.
@@ -166,14 +164,14 @@ namespace AdblockPlus
* Callback type invoked when an update becomes available.
* The parameter is the download URL of the update.
*/
- typedef std::tr1::function<void(const std::string&)>
+ typedef std::function<void(const std::string&)>
Felix Dahlke 2015/08/05 21:28:04 Nit: This was wrapped because it didn't fit in 80
sergei 2015/08/06 07:35:26 Fixed.
UpdateAvailableCallback;
/**
* Callback type invoked when a manually triggered update check finishes.
* The parameter is an optional error message.
*/
- typedef std::tr1::function<void(const std::string&)>
+ typedef std::function<void(const std::string&)>
Felix Dahlke 2015/08/05 21:28:04 Nit: This was wrapped because it didn't fit in 80
sergei 2015/08/06 07:35:29 Fixed.
UpdateCheckDoneCallback;
/**
@@ -183,7 +181,7 @@ namespace AdblockPlus
* for the full list).
* The second parameter is the filter/subscription object affected, if any.
*/
- typedef std::tr1::function<void(const std::string&, const JsValuePtr)> FilterChangeCallback;
+ typedef std::function<void(const std::string&, const JsValuePtr)> FilterChangeCallback;
/**
* Container of name-value pairs representing a set of preferences.
@@ -194,7 +192,7 @@ namespace AdblockPlus
* Callback type invoked when a new notification should be shown.
* The parameter is the Notification object to be shown.
*/
- typedef std::tr1::function<void(const NotificationPtr&)> ShowNotificationCallback;
+ typedef std::function<void(const NotificationPtr&)> ShowNotificationCallback;
/**
* Constructor.
@@ -355,7 +353,7 @@ namespace AdblockPlus
* available or not - to react to updates being available, use
* `FilterEngine::SetUpdateAvailableCallback()`.
*/
- void ForceUpdateCheck(UpdateCheckDoneCallback callback = 0);
+ void ForceUpdateCheck(UpdateCheckDoneCallback callback);
/**
* Sets the callback invoked when the filters change.

Powered by Google App Engine
This is Rietveld