Skip to content

Commit

Permalink
Make shell/platform/{darwin|embedder}/... compatible with `.clang-t…
Browse files Browse the repository at this point in the history
…idy`. (flutter#48160)
  • Loading branch information
matanlurey authored Nov 18, 2023
1 parent 5f40c9f commit ed456a4
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,13 @@ FLUTTER_DARWIN_EXPORT
* - FlutterStandardDataTypeFloat64: 64-bit floats
*/
typedef NS_ENUM(NSInteger, FlutterStandardDataType) {
// NOLINTBEGIN(readability-identifier-naming)
FlutterStandardDataTypeUInt8,
FlutterStandardDataTypeInt32,
FlutterStandardDataTypeInt64,
FlutterStandardDataTypeFloat32,
FlutterStandardDataTypeFloat64,
// NOLINTEND(readability-identifier-naming)
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
extern "C" {
#endif

// NOLINTBEGIN(google-runtime-int)

// Note: Update FlutterStandardFieldIsStandardType if this changes.
typedef enum {
// NOLINTBEGIN(readability-identifier-naming)
FlutterStandardFieldNil,
FlutterStandardFieldTrue,
FlutterStandardFieldFalse,
Expand All @@ -30,6 +33,7 @@ typedef enum {
FlutterStandardFieldList,
FlutterStandardFieldMap,
FlutterStandardFieldFloat32Data,
// NOLINTEND(readability-identifier-naming)
} FlutterStandardField;

static inline bool FlutterStandardFieldIsStandardType(uint8_t field) {
Expand All @@ -38,6 +42,7 @@ static inline bool FlutterStandardFieldIsStandardType(uint8_t field) {
}

typedef enum {
// NOLINTBEGIN(readability-identifier-naming)
FlutterStandardCodecObjcTypeNil,
FlutterStandardCodecObjcTypeNSNumber,
FlutterStandardCodecObjcTypeNSString,
Expand All @@ -46,6 +51,7 @@ typedef enum {
FlutterStandardCodecObjcTypeNSArray,
FlutterStandardCodecObjcTypeNSDictionary,
FlutterStandardCodecObjcTypeUnknown,
// NOLINTEND(readability-identifier-naming)
} FlutterStandardCodecObjcType;

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -105,6 +111,8 @@ bool FlutterStandardCodecHelperWriteNumber(CFMutableDataRef data,

///@}

// NOLINTEND(google-runtime-int)

#if defined(__cplusplus)
}
#endif
Expand Down
4 changes: 4 additions & 0 deletions shell/platform/embedder/embedder.h
Original file line number Diff line number Diff line change
Expand Up @@ -2263,6 +2263,8 @@ typedef struct {

#ifndef FLUTTER_ENGINE_NO_PROTOTYPES

// NOLINTBEGIN(google-objc-function-naming)

//------------------------------------------------------------------------------
/// @brief Creates the necessary data structures to launch a Flutter Dart
/// application in AOT mode. The data may only be collected after
Expand Down Expand Up @@ -3134,6 +3136,8 @@ FLUTTER_EXPORT
FlutterEngineResult FlutterEngineGetProcAddresses(
FlutterEngineProcTable* table);

// NOLINTEND(google-objc-function-naming)

#if defined(__cplusplus)
} // extern "C"
#endif
Expand Down
4 changes: 4 additions & 0 deletions shell/platform/embedder/tests/embedder_assertions.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#include "third_party/skia/include/core/SkPoint.h"
#include "third_party/skia/include/core/SkSize.h"

// NOLINTBEGIN(google-objc-function-naming)

//------------------------------------------------------------------------------
// Equality
//------------------------------------------------------------------------------
Expand Down Expand Up @@ -576,4 +578,6 @@ inline FlutterRoundedRect FlutterRoundedRectMake(const SkRRect& rect) {
return r;
}

// NOLINTEND(google-objc-function-naming)

#endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_ASSERTIONS_H_
5 changes: 3 additions & 2 deletions shell/platform/embedder/tests/embedder_unittests_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define FML_USED_ON_EMBEDDER

#include <future>
#include <utility>

#include "flutter/fml/mapping.h"
#include "flutter/fml/message_loop.h"
Expand Down Expand Up @@ -104,8 +105,8 @@ class EmbedderTestTaskRunner {
EmbedderTestTaskRunner(fml::RefPtr<fml::TaskRunner> real_task_runner,
TaskExpiryCallback on_task_expired)
: identifier_(++sEmbedderTaskRunnerIdentifiers),
real_task_runner_(real_task_runner),
on_task_expired_(on_task_expired) {
real_task_runner_(std::move(real_task_runner)),
on_task_expired_(std::move(on_task_expired)) {
FML_CHECK(real_task_runner_);
FML_CHECK(on_task_expired_);

Expand Down

0 comments on commit ed456a4

Please sign in to comment.