commit | 3e57d82aa59592a37e1e88dbea80143c03de770c | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Thu Nov 18 16:03:36 2021 -0800 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Nov 19 02:29:30 2021 +0000 |
tree | 0cbd4fa05b173ca652cf9856852fc634398c620e | |
parent | 4c7bdcfc1829a4466fd31e24ba89f22eac936e5d [diff] |
pw_assert: Simplify PW_CHECK implementation PW_CHECK optionally accepts a message. Rather than checking if there is a message and either passing "" or __VA_ARGS__, simply pass "" __VA_ARGS__. If there are no arguments, this expands to "". If there are arguments, this expands to "" "format string". This change assumes PW_CHECK format strings are string literals, but this is already required when using pw_assert_log and pw_log_tokenized. Change-Id: If76e7995a81a74ea746d2fd0acc0ec15231e4671 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/70000 Commit-Queue: Wyatt Hepler <hepler@google.com> Reviewed-by: Armando Montanez <amontanez@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/