aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QTC.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-04-02 23:14:10 +0200
committerJay Berkenbilt <ejb@ql.org>2022-04-04 14:10:40 +0200
commit12f1eb15ca3fed6310402847559a7c99d3c77847 (patch)
tree8935675b623c6f3b4914b8b44f7fa5f2816a9241 /libqpdf/QTC.cc
parentf20fa61eb4c323eb1642c69c236b3d9a1f8b2cdb (diff)
downloadqpdf-12f1eb15ca3fed6310402847559a7c99d3c77847.tar.zst
Programmatically apply new formatting to code
Run this: for i in **/*.cc **/*.c **/*.h **/*.hh; do clang-format < $i >| $i.new && mv $i.new $i done
Diffstat (limited to 'libqpdf/QTC.cc')
-rw-r--r--libqpdf/QTC.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/libqpdf/QTC.cc b/libqpdf/QTC.cc
index 53e57ce2..d27bfa8b 100644
--- a/libqpdf/QTC.cc
+++ b/libqpdf/QTC.cc
@@ -1,21 +1,22 @@
#include <qpdf/QTC.hh>
+#include <qpdf/QUtil.hh>
#include <set>
#include <stdio.h>
-#include <qpdf/QUtil.hh>
-static bool tc_active(char const* const scope)
+static bool
+tc_active(char const* const scope)
{
std::string value;
return (QUtil::get_env("TC_SCOPE", &value) && (value == scope));
}
-void QTC::TC(char const* const scope, char const* const ccase, int n)
+void
+QTC::TC(char const* const scope, char const* const ccase, int n)
{
- static std::set<std::pair<std::string, int> > cache;
+ static std::set<std::pair<std::string, int>> cache;
- if (! tc_active(scope))
- {
+ if (!tc_active(scope)) {
return;
}
@@ -25,14 +26,12 @@ void QTC::TC(char const* const scope, char const* const ccase, int n)
#else
# define TC_ENV "TC_FILENAME"
#endif
- if (! QUtil::get_env(TC_ENV, &filename))
- {
+ if (!QUtil::get_env(TC_ENV, &filename)) {
return;
}
#undef TC_ENV
- if (cache.count(std::make_pair(ccase, n)))
- {
+ if (cache.count(std::make_pair(ccase, n))) {
return;
}
cache.insert(std::make_pair(ccase, n));