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

Unified Diff: src/shared/ContentType.cpp

Issue 5316782940225536: Issue 1557 - Update to the recent libadblockplus to reduce additional updates in the logic later. (Closed)
Patch Set: link addon with libadblockplus Created Jan. 29, 2015, 4:05 p.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
« src/engine/Main.cpp ('K') | « src/shared/ContentType.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/ContentType.cpp
diff --git a/src/shared/ContentType.cpp b/src/shared/ContentType.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..7b7cd754fe6ac83b3510d556b02b551b26b4f9b9
--- /dev/null
+++ b/src/shared/ContentType.cpp
@@ -0,0 +1,19 @@
+#include "ContentType.h"
+#include "Communication.h"
+
+using AdblockPlus::FilterEngine;
+using Communication::InputBuffer;
+using Communication::OutputBuffer;
+
+InputBuffer& operator>>(InputBuffer& in, FilterEngine::ContentType& contentType)
Oleksandr 2015/01/30 12:39:11 This seems like a lot of code for very little purp
sergei 2015/01/30 13:20:06 I've removed these files.
Eric 2015/02/02 06:58:27 Sergei added this at my suggestion in order to gat
+{
+ int32_t type;
+ in >> type;
+ contentType = static_cast<FilterEngine::ContentType>(contentType);
+ return in;
+}
+
+OutputBuffer& operator<<(OutputBuffer& out, FilterEngine::ContentType contentType)
+{
+ return out << static_cast<int32_t>(contentType);
+}
« src/engine/Main.cpp ('K') | « src/shared/ContentType.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld