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

Delta Between Two Patch Sets: compiled/bindings/generator.cpp

Issue 29431555: Issue 5216 - [emscripten] Use a more reliable way of retrieving mangled function name (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Left Patch Set: Use std::string for function name rather than std::vector Created May 8, 2017, 10:12 a.m.
Right Patch Set: Two minor fixes Created May 8, 2017, 11:41 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « compiled/bindings/generator.h ('k') | compiled/bindings/library.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 args.push_back(type); 137 args.push_back(type);
138 } 138 }
139 139
140 int nameLength = GetFunctionName(nullptr, function, signature.c_str()); 140 int nameLength = GetFunctionName(nullptr, function, signature.c_str());
141 name.resize(nameLength); 141 name.resize(nameLength);
142 GetFunctionName(name.data(), function, signature.c_str()); 142 GetFunctionName(name.data(), function, signature.c_str());
143 } 143 }
144 144
145 bool FunctionInfo::empty() const 145 bool FunctionInfo::empty() const
146 { 146 {
147 return name.size() == 0; 147 return name.empty();
sergei 2017/05/08 10:58:19 name.empty() would be better.
Wladimir Palant 2017/05/08 11:41:34 Done.
148 } 148 }
149 149
150 ClassInfo* find_class(TYPEID classID) 150 ClassInfo* find_class(TYPEID classID)
151 { 151 {
152 for (auto& classInfo : classes) 152 for (auto& classInfo : classes)
153 if (classInfo.id == classID) 153 if (classInfo.id == classID)
154 return &classInfo; 154 return &classInfo;
155 return nullptr; 155 return nullptr;
156 } 156 }
157 157
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 499
500 void printBindings() 500 void printBindings()
501 { 501 {
502 bindings_internal::printHelpers(); 502 bindings_internal::printHelpers();
503 503
504 for (const auto& item : classes) 504 for (const auto& item : classes)
505 bindings_internal::printClass(item); 505 bindings_internal::printClass(item);
506 for (const auto& item : namespaces) 506 for (const auto& item : namespaces)
507 bindings_internal::printNamespace(item); 507 bindings_internal::printNamespace(item);
508 } 508 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld