From d19343d6440306f9dd5256bdd2eec25fc430fc73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1z=20Zengin?= Date: Fri, 29 Aug 2025 13:40:03 +0300 Subject: [PATCH] pmt: Minor changes. - Add build instruction. - Improve function lambdas. --- README.md | 3 ++- src/functions/InfoFunction.cpp | 4 +--- src/functions/PartitionSizeFunction.cpp | 3 +-- src/functions/functions.hpp | 2 ++ 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 541c3f9..fe0bfa7 100755 --- a/README.md +++ b/README.md @@ -27,7 +27,8 @@ PMT is designed for developers, technicians, and Android enthusiasts who need fi For all information about PMT, see the [wiki](https://github.com/ShawkTeam/pmt-renovated/wiki).\ Read [Wiki - Using PMT via Termux or ADB](https://github.com/ShawkTeam/pmt-renovated/wiki/Using-PMT-via-Termux-or-ADB) for learn how to use PMT via Termux or ADB.\ -Detailed usage instructions and option references can be found in the [Wiki - Usage](https://github.com/ShawkTeam/pmt-renovated/wiki/Usage). +Detailed usage instructions and option references can be found in the [Wiki - Usage](https://github.com/ShawkTeam/pmt-renovated/wiki/Usage).\ +See [Wiki - How To Build](https://github.com/ShawkTeam/pmt-renovated/wiki/How-To-Build) to learn how to build. ## Bug Reporting Please submit bugs at [Issues](https://github.com/ShawkTeam/pmt-renovated/issues) page. diff --git a/src/functions/InfoFunction.cpp b/src/functions/InfoFunction.cpp index 79c6525..d5acc79 100644 --- a/src/functions/InfoFunction.cpp +++ b/src/functions/InfoFunction.cpp @@ -58,9 +58,7 @@ INIT(infoFunction) { RUN(infoFunction) { std::vector jParts; - auto func = [this, - &jParts](std::string partition, - const PartitionMap::Map_t::BasicInf props) -> bool { + auto func = [this, &jParts] COMMON_LAMBDA_PARAMS -> bool { if (Variables->onLogical && !props.isLogical) { if (Variables->forceProcess) LOGN(IFUN, WARNING) diff --git a/src/functions/PartitionSizeFunction.cpp b/src/functions/PartitionSizeFunction.cpp index 07c3283..59c7b64 100644 --- a/src/functions/PartitionSizeFunction.cpp +++ b/src/functions/PartitionSizeFunction.cpp @@ -60,8 +60,7 @@ INIT(partitionSizeFunction) { } RUN(partitionSizeFunction) { - auto func = [this](std::string partition, - PartitionMap::Map_t::BasicInf props) -> bool { + auto func = [this] COMMON_LAMBDA_PARAMS -> bool { if (Variables->onLogical && !props.isLogical) { if (Variables->forceProcess) LOGN(SFUN, WARNING) diff --git a/src/functions/functions.hpp b/src/functions/functions.hpp index f6462aa..575582a 100644 --- a/src/functions/functions.hpp +++ b/src/functions/functions.hpp @@ -29,6 +29,8 @@ bool cls::isUsed() const { return cmd->parsed(); } #define NAME(cls) const char *cls::name() const +#define COMMON_LAMBDA_PARAMS \ + (std::string partition, const PartitionMap::Map_t::BasicInf props) #define COMMON_FUNCTION_BODY() \ CLI::App *cmd = nullptr; \ bool init(CLI::App &_app) override; \