summaryrefslogtreecommitdiff
path: root/include/json_html_serializer.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2021-09-22 20:07:25 +0300
committerEd Tanous <ed@tanous.net>2021-09-23 19:18:39 +0300
commit3c2a8d097fed071b0705b08e959794b2b9fd383c (patch)
tree020d04e044bb114afa11414345ba26990635dfbc /include/json_html_serializer.hpp
parent35440d18b18aecfc106baaa794c57bfd30c8ad05 (diff)
downloadbmcweb-3c2a8d097fed071b0705b08e959794b2b9fd383c.tar.xz
Make code format the same
The only difference between a clang-format-11 formatter and a clang-format-12 formatter seems to be this line, which seems to confuse people. https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/46932 already got pushed trying to "fix" this, only to be rejected by CI. It appears that the extra parens on the method name seems to confuse clang-format, which makes little sense. This is code we inherited from nlohmann and changed to support the html formatter, so while nlohmann might have had good reasons for it (weird compiler support maybe) we don't need it, so this patchset removes the parens and reformats. Tested: Code compiles. No functional changes. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ide31e0be057d4b97da69203890ca6720e79887e5
Diffstat (limited to 'include/json_html_serializer.hpp')
-rw-r--r--include/json_html_serializer.hpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/json_html_serializer.hpp b/include/json_html_serializer.hpp
index 2382f29e96..be9efc48c7 100644
--- a/include/json_html_serializer.hpp
+++ b/include/json_html_serializer.hpp
@@ -397,9 +397,8 @@ inline void dumpfloat(std::string& out, double number,
static constexpr auto d = std::numeric_limits<double>::max_digits10;
// the actual conversion
- std::ptrdiff_t len =
- (std::snprintf)(numberbuffer.data(), numberbuffer.size(), "%.*g", d,
- number);
+ std::ptrdiff_t len = std::snprintf(numberbuffer.data(), numberbuffer.size(),
+ "%.*g", d, number);
// negative value indicates an error
if (len <= 0)