diff --git a/src/checks/level0/README-lambda-in-connect.md b/src/checks/level0/README-lambda-in-connect.md index e98b125..bfdefec 100644 --- a/src/checks/level0/README-lambda-in-connect.md +++ b/src/checks/level0/README-lambda-in-connect.md @@ -1,13 +1,13 @@ # lambda-in-connect Warns when a lambda inside a connect captures local variables by reference. -This usually results in a crash since the lambda might get called after the variable went out of scope. +This usually results in a crash since the lambda might get called after the captured variable went out of scope. #### Example: ```` int a; - connect(obj, &MyObj::mySignal, [&a](){ ... }); + connect(obj, &MyObj::mySignal, [&a]{ ... }); ```` Although it's dangerous to capture by reference in other situations too, this check only warns for connects, otherwise it would generate false-positives in legitimate situations where you only use the lambda before going out of scope. diff --git a/src/checks/level0/README-wrong-qglobalstatic.md b/src/checks/level0/README-wrong-qglobalstatic.md index 1a6590a..7073487 100644 --- a/src/checks/level0/README-wrong-qglobalstatic.md +++ b/src/checks/level0/README-wrong-qglobalstatic.md @@ -1,14 +1,14 @@ # wrong-qglobalstatic Finds `Q_GLOBAL_STATIC`s being used with trivial types. -This is unnecessary and creates more code bloat. +This is unnecessary and creates code bloat. #### Example: struct Trivial { int v; }; Q_GLOBAL_STATIC(Trivial, t); // Wrong static Trivial t; // Correct