Fabric: Enabling clang-format for the rest of Fabric

Summary: This is the second and the final part of adopting clang-format.

Reviewed By: mdvacca

Differential Revision: D10229624

fbshipit-source-id: d97670b716800ea2488b84bd0aacaf54d8bd2e31
This commit is contained in:
Valentin Shergin
2018-10-09 16:25:13 -07:00
committed by Facebook Github Bot
parent 01af828d16
commit 8f51243957
78 changed files with 1719 additions and 1345 deletions

View File

@@ -7,8 +7,8 @@
#pragma once
#include <string>
#include <memory>
#include <string>
#include <vector>
namespace facebook {
@@ -22,12 +22,14 @@ namespace react {
class DebugStringConvertible;
using SharedDebugStringConvertible = std::shared_ptr<const DebugStringConvertible>;
using SharedDebugStringConvertibleList = std::vector<SharedDebugStringConvertible>;
using SharedDebugStringConvertible =
std::shared_ptr<const DebugStringConvertible>;
using SharedDebugStringConvertibleList =
std::vector<SharedDebugStringConvertible>;
struct DebugStringConvertibleOptions {
bool format {true};
int maximumDepth {INT_MAX};
bool format{true};
int maximumDepth{INT_MAX};
};
// Abstract class describes conformance to DebugStringConvertible concept
@@ -35,8 +37,7 @@ struct DebugStringConvertibleOptions {
// Use this as a base class for providing a debugging textual representation
// of your class.
class DebugStringConvertible {
public:
public:
virtual ~DebugStringConvertible() = default;
// Returns a name of the object.
@@ -60,12 +61,18 @@ public:
// Returns a string which represents the object in a human-readable way.
// Default implementation returns a description of the subtree
// rooted at this node, represented in XML-like format.
virtual std::string getDebugDescription(DebugStringConvertibleOptions options = {}, int depth = 0) const;
virtual std::string getDebugDescription(
DebugStringConvertibleOptions options = {},
int depth = 0) const;
// Do same as `getDebugDescription` but return only *children* and
// *properties* parts (which are used in `getDebugDescription`).
virtual std::string getDebugPropsDescription(DebugStringConvertibleOptions options = {}, int depth = 0) const;
virtual std::string getDebugChildrenDescription(DebugStringConvertibleOptions options = {}, int depth = 0) const;
virtual std::string getDebugPropsDescription(
DebugStringConvertibleOptions options = {},
int depth = 0) const;
virtual std::string getDebugChildrenDescription(
DebugStringConvertibleOptions options = {},
int depth = 0) const;
};
#else