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

Unified Diff: src/FilterEngine.cpp

Issue 29421562: Noissue - add copy and move constructors and assign operators for Filter (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created April 25, 2017, 8:32 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
« no previous file with comments | « include/AdblockPlus/FilterEngine.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/FilterEngine.cpp
diff --git a/src/FilterEngine.cpp b/src/FilterEngine.cpp
index 85553f34d00bd9346642d96c547fc5e3f6967869..3284a008a25ca66077f2f2a3efe5ba25462d25b8 100644
--- a/src/FilterEngine.cpp
+++ b/src/FilterEngine.cpp
@@ -37,6 +37,28 @@ Filter::Filter(JsValue&& value)
throw std::runtime_error("JavaScript value is not an object");
}
+Filter::Filter(const Filter& src)
+ : JsValue(src)
+{
+}
+
+Filter::Filter(Filter&& src)
+ : JsValue(std::move(src))
+{
+}
+
+Filter& Filter::operator=(const Filter& src)
+{
+ static_cast<JsValue&>(*this) = src;
+ return *this;
+}
+
+Filter& Filter::operator=(Filter&& src)
+{
+ static_cast<JsValue&>(*this) = std::move(src);
+ return *this;
+}
+
Filter::Type Filter::GetType() const
{
std::string className = GetClass();
« no previous file with comments | « include/AdblockPlus/FilterEngine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld