Update clang-format (pre-commit) (#2312)
This commit is contained in:
@@ -5,7 +5,7 @@ repos:
|
||||
- id: check-yaml
|
||||
args: [--allow-multiple-documents]
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v18.1.3
|
||||
rev: v18.1.4
|
||||
hooks:
|
||||
- id: clang-format
|
||||
files: '.*\.(hpp|cpp|h)'
|
||||
@@ -21,4 +21,5 @@ repos:
|
||||
additional_dependencies: [shellcheck-py]
|
||||
ci:
|
||||
# sometimes fails https://github.com/keith/pre-commit-buildifier/issues/13
|
||||
skip: [buildifier]
|
||||
skip: [buildifier]
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ private:
|
||||
/// @brief IBufferAllocator hides the underlying implementation of the buffer allocator scheme used.
|
||||
class IBufferAllocator {
|
||||
public:
|
||||
virtual ~IBufferAllocator(){};
|
||||
virtual ~IBufferAllocator() {};
|
||||
|
||||
/// @brief Write data into a buffer managed by the allocator
|
||||
/// @param data Pointer to data to write into the buffer
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace mbgl {
|
||||
template <typename Func>
|
||||
struct Scoped {
|
||||
Scoped(Func&& fn)
|
||||
: cb(std::move(fn)){};
|
||||
: cb(std::move(fn)) {};
|
||||
~Scoped() { cb(); }
|
||||
|
||||
Scoped(const Scoped&) = delete;
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
zoomRange(zoomRange_),
|
||||
attribution(std::move(attribution_)),
|
||||
scheme(scheme_),
|
||||
encoding(encoding_){};
|
||||
encoding(encoding_) {};
|
||||
|
||||
// TileJSON also includes center and zoom but they are not used by mbgl.
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class HTTPFileSource::Impl {
|
||||
public:
|
||||
Impl(const ResourceOptions resourceOptions_, const ClientOptions clientOptions_)
|
||||
: resourceOptions(resourceOptions_.clone()),
|
||||
clientOptions(clientOptions_.clone()){};
|
||||
clientOptions(clientOptions_.clone()) {};
|
||||
|
||||
android::UniqueEnv env{android::AttachEnv()};
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
PointForFn pointForFn,
|
||||
LatLngForFn latLngForFn);
|
||||
|
||||
MapSnapshot(jni::JNIEnv&){};
|
||||
MapSnapshot(jni::JNIEnv&) {};
|
||||
MapSnapshot(float pixelRatio, PointForFn, LatLngForFn);
|
||||
~MapSnapshot();
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
|
||||
private:
|
||||
NodeExpression(std::unique_ptr<mbgl::style::expression::Expression> expression_)
|
||||
: expression(std::move(expression_)){};
|
||||
: expression(std::move(expression_)) {};
|
||||
|
||||
static void New(const Nan::FunctionCallbackInfo<v8::Value>&);
|
||||
static void Parse(const Nan::FunctionCallbackInfo<v8::Value>&);
|
||||
|
||||
@@ -37,7 +37,7 @@ const std::string AnnotationManager::PointLayerID = "com.mapbox.annotations.poin
|
||||
const std::string AnnotationManager::ShapeLayerID = "com.mapbox.annotations.shape.";
|
||||
|
||||
AnnotationManager::AnnotationManager(Style& style_)
|
||||
: style(style_){};
|
||||
: style(style_) {};
|
||||
|
||||
AnnotationManager::~AnnotationManager() = default;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ TEST(Actor, Construction) {
|
||||
TEST(Actor, Destruction) {
|
||||
struct TestActor {
|
||||
TestActor(ActorRef<TestActor>, bool& destructed_)
|
||||
: destructed(destructed_){};
|
||||
: destructed(destructed_) {};
|
||||
~TestActor() { destructed = true; }
|
||||
|
||||
bool& destructed;
|
||||
@@ -136,7 +136,7 @@ TEST(Actor, DestructionAllowedInReceiveOnSameThread) {
|
||||
// allows for self-closing actors
|
||||
|
||||
struct TestActor {
|
||||
TestActor(ActorRef<TestActor>){};
|
||||
TestActor(ActorRef<TestActor>) {};
|
||||
|
||||
void callMeBack(std::function<void()> callback) { callback(); }
|
||||
};
|
||||
@@ -162,7 +162,7 @@ TEST(Actor, SelfDestructionDoesntCrashWaitingReceivingThreads) {
|
||||
// callback
|
||||
|
||||
struct TestActor {
|
||||
TestActor(ActorRef<TestActor>){};
|
||||
TestActor(ActorRef<TestActor>) {};
|
||||
|
||||
void callMeBack(std::function<void()> callback) { callback(); }
|
||||
};
|
||||
@@ -334,7 +334,7 @@ TEST(Actor, TwoPhaseConstruction) {
|
||||
|
||||
struct TestActor {
|
||||
TestActor(ActorRef<TestActor>, std::shared_ptr<bool> destroyed_)
|
||||
: destroyed(std::move(destroyed_)){};
|
||||
: destroyed(std::move(destroyed_)) {};
|
||||
|
||||
~TestActor() { *destroyed = true; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user