clang-format: update to latest from docs repo
This is from openbmc/docs/style/cpp/.clang-format
Other OpenBMC repos are doing the same.
Tested: Built and validator passed.
Change-Id: Ief26c755c9ce012823e16a506342b0547a53517a
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/src/crow_test.cpp b/src/crow_test.cpp
index f427a2f..f53e519 100644
--- a/src/crow_test.cpp
+++ b/src/crow_test.cpp
@@ -1,9 +1,9 @@
+#include "crow.h"
+
#include <iostream>
#include <sstream>
#include <vector>
-#include "crow.h"
-
#include "gtest/gtest.h"
using namespace std;
@@ -22,7 +22,8 @@
error_print(args...);
}
-template <typename... Args> void fail(Args... args)
+template <typename... Args>
+void fail(Args... args)
{
error_print(args...);
failed__ = true;
@@ -58,8 +59,7 @@
fail("empty handler should fail to validate");
}
catch (runtime_error& e)
- {
- }
+ {}
int x = 0;
@@ -484,33 +484,27 @@
struct NullMiddleware
{
struct Context
- {
- };
+ {};
template <typename AllContext>
void beforeHandle(Request&, Response&, Context&, AllContext&)
- {
- }
+ {}
template <typename AllContext>
void afterHandle(Request&, Response&, Context&, AllContext&)
- {
- }
+ {}
};
struct NullSimpleMiddleware
{
struct Context
- {
- };
+ {};
void beforeHandle(Request& /*req*/, Response& /*res*/, Context& /*ctx*/)
- {
- }
+ {}
void afterHandle(Request& /*req*/, Response& /*res*/, Context& /*ctx*/)
- {
- }
+ {}
};
TEST(Crow, middleware_simple)
@@ -569,8 +563,7 @@
struct SecondMW
{
struct Context
- {
- };
+ {};
template <typename AllContext>
void beforeHandle(Request& req, Response& res, Context&,
AllContext& all_ctx)
@@ -590,8 +583,7 @@
struct ThirdMW
{
struct Context
- {
- };
+ {};
template <typename AllContext>
void beforeHandle(Request&, Response&, Context&, AllContext& all_ctx)
{
@@ -895,8 +887,7 @@
fail();
}
catch (std::exception&)
- {
- }
+ {}
// app is in an invalid state when routeDynamic throws an exception.
try
@@ -905,8 +896,7 @@
fail();
}
catch (std::exception&)
- {
- }
+ {}
{
boost::beast::http::request<boost::beast::http::string_body> r{};