mirror of
https://github.com/pantor/inja.git
synced 2026-02-17 09:03:58 +00:00
fix more clang-tidy warnings
This commit is contained in:
@@ -3,6 +3,7 @@ Checks: >
|
|||||||
-abseil-*,
|
-abseil-*,
|
||||||
-altera-*,
|
-altera-*,
|
||||||
-boost-*,
|
-boost-*,
|
||||||
|
-cppcoreguidelines-avoid-const-or-ref-data-members,
|
||||||
-cppcoreguidelines-avoid-goto,
|
-cppcoreguidelines-avoid-goto,
|
||||||
-cppcoreguidelines-non-private-member-variables-in-classes,
|
-cppcoreguidelines-non-private-member-variables-in-classes,
|
||||||
-fuchsia-*,
|
-fuchsia-*,
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace inja {
|
|||||||
*/
|
*/
|
||||||
inline std::string htmlescape(const std::string& data) {
|
inline std::string htmlescape(const std::string& data) {
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
buffer.reserve((unsigned int)(1.1 * data.size()));
|
buffer.reserve(static_cast<size_t>(1.1 * data.size()));
|
||||||
for (size_t pos = 0; pos != data.size(); ++pos) {
|
for (size_t pos = 0; pos != data.size(); ++pos) {
|
||||||
switch (data[pos]) {
|
switch (data[pos]) {
|
||||||
case '&': buffer.append("&"); break;
|
case '&': buffer.append("&"); break;
|
||||||
|
|||||||
@@ -1967,7 +1967,7 @@ class Parser {
|
|||||||
throw_parser_error("expected id, got '" + tok.describe() + "'");
|
throw_parser_error("expected id, got '" + tok.describe() + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
const Token key_token = std::move(value_token);
|
const Token key_token = value_token;
|
||||||
value_token = tok;
|
value_token = tok;
|
||||||
get_next_token();
|
get_next_token();
|
||||||
|
|
||||||
@@ -2183,7 +2183,7 @@ namespace inja {
|
|||||||
*/
|
*/
|
||||||
inline std::string htmlescape(const std::string& data) {
|
inline std::string htmlescape(const std::string& data) {
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
buffer.reserve((unsigned int)(1.1 * data.size()));
|
buffer.reserve(static_cast<size_t>(1.1 * data.size()));
|
||||||
for (size_t pos = 0; pos != data.size(); ++pos) {
|
for (size_t pos = 0; pos != data.size(); ++pos) {
|
||||||
switch (data[pos]) {
|
switch (data[pos]) {
|
||||||
case '&': buffer.append("&"); break;
|
case '&': buffer.append("&"); break;
|
||||||
|
|||||||
Reference in New Issue
Block a user