Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 25c5747

Browse files
authored
Add missing header guards (#41322)
These keep turning up, so I did a little bash-fu to find them all. ```bash grep -lL "#pragma once" $(grep -lL "#ifndef .*_H_" $(find . | grep "\.h$")) | cut -c 3- ```
1 parent bb29628 commit 25c5747

File tree

21 files changed

+80
-6
lines changed

21 files changed

+80
-6
lines changed

common/constants.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#ifndef FLUTTER_COMMON_CONSTANTS_H_
6+
#define FLUTTER_COMMON_CONSTANTS_H_
7+
58
namespace flutter {
69
constexpr double kMegaByteSizeInBytes = (1 << 20);
710
} // namespace flutter
11+
12+
#endif // FLUTTER_COMMON_CONSTANTS_H_

flow/flow_test_utils.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#ifndef FLUTTER_FLOW_TEST_UTILS_H_
6+
#define FLUTTER_FLOW_TEST_UTILS_H_
7+
58
#include <string>
69

710
namespace flutter {
@@ -15,3 +18,5 @@ const std::string& GetFontFile();
1518
void SetFontFile(const std::string& dir);
1619

1720
} // namespace flutter
21+
22+
#endif // FLUTTER_FLOW_TEST_UTILS_H_

flow/paint_region.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#ifndef FLUTTER_FLOW_PAINT_REGION_H_
6+
#define FLUTTER_FLOW_PAINT_REGION_H_
7+
58
#include <vector>
69
#include "flutter/fml/logging.h"
710
#include "third_party/skia/include/core/SkRect.h"
@@ -65,3 +68,5 @@ class PaintRegion {
6568
};
6669

6770
} // namespace flutter
71+
72+
#endif // FLUTTER_FLOW_PAINT_REGION_H_

flow/testing/diff_context_test.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#ifndef FLUTTER_SHELL_DIFF_CONTEXT_TEST_H_
6+
#define FLUTTER_SHELL_DIFF_CONTEXT_TEST_H_
7+
58
#include "flutter/flow/layers/container_layer.h"
69
#include "flutter/flow/layers/display_list_layer.h"
710
#include "flutter/flow/layers/opacity_layer.h"
@@ -66,3 +69,5 @@ class DiffContextTest : public LayerTest {
6669

6770
} // namespace testing
6871
} // namespace flutter
72+
73+
#endif // FLUTTER_SHELL_DIFF_CONTEXT_TEST_H_

flow/testing/mock_texture.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#ifndef FLOW_TESTING_MOCK_TEXTURE_H_
6+
#define FLOW_TESTING_MOCK_TEXTURE_H_
7+
58
#include <ostream>
69
#include <vector>
710

@@ -57,3 +60,5 @@ extern std::ostream& operator<<(std::ostream& os,
5760

5861
} // namespace testing
5962
} // namespace flutter
63+
64+
#endif // FLOW_TESTING_MOCK_TEXTURE_H_

fml/math.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#ifndef FLUTTER_FML_MATH_H_
6+
#define FLUTTER_FML_MATH_H_
7+
58
namespace flutter {
69
namespace math {
710

@@ -46,3 +49,5 @@ constexpr float k1OverSqrt2 = 0.70710678118654752440;
4649

4750
} // namespace math
4851
} // namespace flutter
52+
53+
#endif // FLUTTER_FML_MATH_H_

impeller/archivist/archive_class_registration.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#pragma once
6+
57
#include <map>
68
#include <optional>
79

impeller/entity/contents/scene_contents.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#pragma once
6+
57
#include <memory>
68

79
#include "impeller/entity/contents/color_source_contents.h"

impeller/fixtures/golden_paths.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#pragma once
6+
57
#include <vector>
68

79
#include "impeller/geometry/path_component.h"

impeller/fixtures/types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#pragma once
6+
57
struct Uniforms {
68
mat4 model;
79
mat4 view;

0 commit comments

Comments
 (0)