| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 } |
| LEFT | RIGHT |