From 785cc696449759be061c7db68d2c0f45f65d5ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20M=C3=BCller?= <27155134+arm-in@users.noreply.github.com> Date: Thu, 8 Aug 2019 21:05:28 +0200 Subject: [PATCH] Typos found by running "codespell" (#2072) --- addons/cert.py | 20 ++++++++++---------- lib/astutils.cpp | 2 +- lib/templatesimplifier.cpp | 6 +++--- lib/templatesimplifier.h | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/addons/cert.py b/addons/cert.py index cb6749468..d3573afa3 100755 --- a/addons/cert.py +++ b/addons/cert.py @@ -238,25 +238,25 @@ def int31(data, platform): def msc24(data): for token in data.tokenlist: if isFunctionCall(token, ('asctime',), 1): - reportError(token,'style','Do no use asctime() better use asctime_s()', 'MSC24-C') + reportError(token,'style','Do not use asctime() better use asctime_s()', 'MSC24-C') elif isFunctionCall(token, ('atof',), 1): - reportError(token,'style','Do no use atof() better use strtod()', 'MSC24-C') + reportError(token,'style','Do not use atof() better use strtod()', 'MSC24-C') elif isFunctionCall(token, ('atoi',), 1): - reportError(token,'style','Do no use atoi() better use strtol()', 'MSC24-C') + reportError(token,'style','Do not use atoi() better use strtol()', 'MSC24-C') elif isFunctionCall(token, ('atol',), 1): - reportError(token,'style','Do no use atol() better use strtol()', 'MSC24-C') + reportError(token,'style','Do not use atol() better use strtol()', 'MSC24-C') elif isFunctionCall(token, ('atoll',), 1): - reportError(token,'style','Do no use atoll() better use strtoll()', 'MSC24-C') + reportError(token,'style','Do not use atoll() better use strtoll()', 'MSC24-C') elif isFunctionCall(token, ('ctime',), 1): - reportError(token,'style','Do no use ctime() better use ctime_s()', 'MSC24-C') + reportError(token,'style','Do not use ctime() better use ctime_s()', 'MSC24-C') elif isFunctionCall(token, ('fopen',), 2): - reportError(token,'style','Do no use fopen() better use fopen_s()', 'MSC24-C') + reportError(token,'style','Do not use fopen() better use fopen_s()', 'MSC24-C') elif isFunctionCall(token, ('freopen',), 3): - reportError(token,'style','Do no use freopen() better use freopen_s()', 'MSC24-C') + reportError(token,'style','Do not use freopen() better use freopen_s()', 'MSC24-C') elif isFunctionCall(token, ('rewind',), 1): - reportError(token,'style','Do no use rewind() better use fseek()', 'MSC24-C') + reportError(token,'style','Do not use rewind() better use fseek()', 'MSC24-C') elif isFunctionCall(token, ('setbuf',), 2): - reportError(token,'style','Do no use setbuf() better use setvbuf()', 'MSC24-C') + reportError(token,'style','Do not use setbuf() better use setvbuf()', 'MSC24-C') # MSC30-C # Do not use the rand() function for generating pseudorandom numbers diff --git a/lib/astutils.cpp b/lib/astutils.cpp index 30f25e0be..fb051ce5c 100644 --- a/lib/astutils.cpp +++ b/lib/astutils.cpp @@ -1417,7 +1417,7 @@ PathAnalysis::Progress PathAnalysis::forwardRange(const Token* startToken, const if (f(info) == Progress::Break) return Progress::Break; } - // Prevent inifinite recursion + // Prevent infinite recursion if (tok->next() == start) break; } diff --git a/lib/templatesimplifier.cpp b/lib/templatesimplifier.cpp index b3d3409a5..5243015df 100644 --- a/lib/templatesimplifier.cpp +++ b/lib/templatesimplifier.cpp @@ -774,7 +774,7 @@ void TemplateSimplifier::getTemplateInstantiations() const bool isUsing = tok->strAt(1) == "using"; if (isUsing && Token::Match(tok->tokAt(2), "%name% <")) { - // Cant have specialized type alias so ignore it + // Can't have specialized type alias so ignore it Token *tok2 = Token::findsimplematch(tok->tokAt(3), ";"); if (tok2) tok = tok2; @@ -795,12 +795,12 @@ void TemplateSimplifier::getTemplateInstantiations() tok = tok2; } } else if (Token::Match(tok, "template using %name% <")) { - // Cant have specialized type alias so ignore it + // Can't have specialized type alias so ignore it Token *tok2 = Token::findsimplematch(tok->tokAt(3), ";"); if (tok2) tok = tok2; } else if (Token::Match(tok, "using %name% <")) { - // Cant have specialized type alias so ignore it + // Can't have specialized type alias so ignore it Token *tok2 = Token::findsimplematch(tok->tokAt(2), ";"); if (tok2) tok = tok2; diff --git a/lib/templatesimplifier.h b/lib/templatesimplifier.h index e65343763..037b11324 100644 --- a/lib/templatesimplifier.h +++ b/lib/templatesimplifier.h @@ -216,7 +216,7 @@ public: * @return true if same family, false if different family */ bool isSameFamily(const TemplateSimplifier::TokenAndName &decl) const { - // maks sure a family flag is set and matches + // make sure a family flag is set and matches return (flags & (fIsClass | fIsFunction | fIsVariable)) & (decl.flags & (fIsClass | fIsFunction | fIsVariable)); }