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

Unified Diff: compiled/bindings/generator.cpp

Issue 29543756: Noissue - fix generation of a new instance creation of a class without subclass differentiator (Closed) Base URL: https://github.com/adblockplus/adblockpluscore.git
Patch Set: Created Sept. 13, 2017, 4:38 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/bindings/generator.cpp
diff --git a/compiled/bindings/generator.cpp b/compiled/bindings/generator.cpp
index ab6c504625e3f21b96ae6d44ee7336c7dc307722..56e9463329633436bd5bb46be1f92c681a41c649 100644
--- a/compiled/bindings/generator.cpp
+++ b/compiled/bindings/generator.cpp
@@ -257,11 +257,7 @@ namespace bindings_internal
if (!cls)
throw std::runtime_error("Function " + call.name + " returns pointer to unknown class");
- auto offset = cls->subclass_differentiator.offset;
- if (offset == SIZE_MAX)
- result += " result = exports." + cls->name + "(result);\n";
- else
- result += " result = exports." + cls->name + ".fromPointer(result);\n";
+ result += " result = exports." + cls->name + ".fromPointer(result);\n";
sergei 2017/09/13 17:09:10 Another option here could be to keep the if and fo
Wladimir Palant 2017/09/19 08:51:48 Trouble is, bindings overhead is very much non-neg
sergei 2017/09/19 09:14:35 I have uploaded the version without fromPointer fo
result += " else\n";
result += " result = null;\n";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld