Clang-format

This commit is contained in:
Marcus Holland-Moritz 2020-12-07 22:12:07 +01:00
parent 8bce415dd9
commit 272d726c73
6 changed files with 13 additions and 15 deletions

View File

@ -33,8 +33,8 @@
#include <sys/types.h> #include <sys/types.h>
#include <folly/dynamic.h>
#include <folly/Expected.h> #include <folly/Expected.h>
#include <folly/dynamic.h>
#include "dwarfs/metadata_types.h" #include "dwarfs/metadata_types.h"

View File

@ -34,9 +34,9 @@
#include <sys/types.h> #include <sys/types.h>
#include <folly/dynamic.h>
#include <folly/Expected.h> #include <folly/Expected.h>
#include <folly/Range.h> #include <folly/Range.h>
#include <folly/dynamic.h>
#include "dwarfs/metadata_types.h" #include "dwarfs/metadata_types.h"
@ -69,9 +69,7 @@ class metadata_v2 {
impl_->dump(os, detail_level, icb); impl_->dump(os, detail_level, icb);
} }
folly::dynamic as_dynamic() const { folly::dynamic as_dynamic() const { return impl_->as_dynamic(); }
return impl_->as_dynamic();
}
static void get_stat_defaults(struct ::stat* defaults); static void get_stat_defaults(struct ::stat* defaults);

View File

@ -500,4 +500,5 @@ block_manager::block_manager(logger& lgr, progress& prog, const config& cfg,
filesystem_writer& fsw) filesystem_writer& fsw)
: impl_(make_unique_logging_object<impl, block_manager_, logger_policies>( : impl_(make_unique_logging_object<impl, block_manager_, logger_policies>(
lgr, prog, cfg, os, fsw)) {} lgr, prog, cfg, os, fsw)) {}
} // namespace dwarfs } // namespace dwarfs

View File

@ -504,10 +504,8 @@ folly::dynamic metadata_<LoggerPolicy>::as_dynamic() const {
struct ::statvfs stbuf; struct ::statvfs stbuf;
statvfs(&stbuf); statvfs(&stbuf);
obj["statvfs"] = folly::dynamic::object obj["statvfs"] = folly::dynamic::object("f_bsize", stbuf.f_bsize)(
("f_bsize", stbuf.f_bsize) "f_files", stbuf.f_files)("f_blocks", stbuf.f_blocks);
("f_files", stbuf.f_files)
("f_blocks", stbuf.f_blocks);
obj["root"] = as_dynamic(root_); obj["root"] = as_dynamic(root_);

View File

@ -24,8 +24,8 @@
#include <boost/program_options.hpp> #include <boost/program_options.hpp>
#include <folly/json.h>
#include <folly/String.h> #include <folly/String.h>
#include <folly/json.h>
#include "dwarfs/filesystem_v2.h" #include "dwarfs/filesystem_v2.h"
#include "dwarfs/logger.h" #include "dwarfs/logger.h"

View File

@ -155,7 +155,7 @@ std::vector<std::string> versions {
"0.2.3", "0.2.3",
}; };
} } // namespace
using namespace dwarfs; using namespace dwarfs;
@ -164,7 +164,8 @@ class compat : public testing::TestWithParam<std::string> {};
TEST_P(compat, backwards_compatibility) { TEST_P(compat, backwards_compatibility) {
std::ostringstream oss; std::ostringstream oss;
stream_logger lgr(oss); stream_logger lgr(oss);
auto filename = std::string(TEST_DATA_DIR "/compat-v") + GetParam() + ".dwarfs"; auto filename =
std::string(TEST_DATA_DIR "/compat-v") + GetParam() + ".dwarfs";
filesystem_v2 fs(lgr, std::make_shared<mmap>(filename)); filesystem_v2 fs(lgr, std::make_shared<mmap>(filename));
auto meta = fs.metadata_as_dynamic(); auto meta = fs.metadata_as_dynamic();
auto ref = folly::parseJson(reference); auto ref = folly::parseJson(reference);