From: Automatic source maintenance Date: Sat, 15 Dec 2012 01:13:21 +0000 (-0700) Subject: SourceFormat Enforcement X-Git-Tag: SQUID_3_4_0_1~437 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2113e038940f5bd70bf307b71bd97659d6f9f3cd;p=thirdparty%2Fsquid.git SourceFormat Enforcement --- diff --git a/src/Debug.h b/src/Debug.h index e772b467f7..18c01ca491 100644 --- a/src/Debug.h +++ b/src/Debug.h @@ -159,15 +159,15 @@ void _db_print(const char *,...) PRINTF_FORMAT_ARG1; void _db_set_syslog(const char *facility); void _db_rotate_log(void); - /// Prints raw and/or non-terminated data safely, efficiently, and beautifully. /// Allows raw data debugging in debugs() statements with low debugging levels /// by printing only if higher section debugging levels are configured: /// debugs(11, DBG_IMPORTANT, "always printed" << Raw(may be printed...)); -class Raw { +class Raw +{ public: Raw(const char *label, const char *data, const size_t size): - level(-1), label_(label), data_(data), size_(size) {} + level(-1), label_(label), data_(data), size_(size) {} /// limit data printing to at least the given debugging level Raw &minLevel(const int aLevel) { level = aLevel; return *this; } diff --git a/src/debug.cc b/src/debug.cc index 83ab4ecd45..7320fe9ad3 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -814,7 +814,7 @@ Raw::print(std::ostream &os) const // finalize debugging level if no level was set explicitly via minLevel() const int finalLevel = (level >= 0) ? level : - (size_ > 40 ? DBG_DATA : Debug::sectionLevel); + (size_ > 40 ? DBG_DATA : Debug::sectionLevel); if (finalLevel <= Debug::sectionLevel) { os << (label_ ? '=' : ' '); if (data_) diff --git a/src/tests/stub_debug.cc b/src/tests/stub_debug.cc index c7f6133ca0..4634aba624 100644 --- a/src/tests/stub_debug.cc +++ b/src/tests/stub_debug.cc @@ -153,7 +153,7 @@ Raw::print(std::ostream &os) const // finalize debugging level if no level was set explicitly via minLevel() const int finalLevel = (level >= 0) ? level : - (size_ > 40 ? DBG_DATA : Debug::sectionLevel); + (size_ > 40 ? DBG_DATA : Debug::sectionLevel); if (finalLevel <= Debug::sectionLevel) { os << (label_ ? '=' : ' '); os.write(data_, size_);