Skip to content

Commit f7b86d6

Browse files
committed
Move common/ to ift/common/ to avoid public apis under 'common::' namespace.
1 parent 450780c commit f7b86d6

File tree

170 files changed

+1163
-1115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+1163
-1115
lines changed

brotli/BUILD

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cc_library(
2222
"//visibility:public",
2323
],
2424
deps = [
25-
"//common",
25+
"//ift/common",
2626
"@abseil-cpp//absl/types:span",
2727
"@brotli//:brotlienc",
2828
],
@@ -50,11 +50,11 @@ cc_test(
5050
"brotli_stream_test.cc",
5151
],
5252
data = [
53-
"//common:testdata",
53+
"//ift/common:testdata",
5454
],
5555
deps = [
5656
":encoding",
57-
"//common",
57+
"//ift/common",
5858
"@abseil-cpp//absl/types:span",
5959
"@brotli//:brotlienc",
6060
"@googletest//:gtest_main",

brotli/brotli_font_diff.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
#include "brotli/hmtx_differ.h"
77
#include "brotli/loca_differ.h"
88
#include "brotli/table_range.h"
9-
#include "common/int_set.h"
9+
#include "ift/common/int_set.h"
1010

1111
namespace brotli {
1212

1313
using absl::Span;
1414
using absl::Status;
15-
using common::FontData;
16-
using common::IntSet;
15+
using ift::common::FontData;
16+
using ift::common::IntSet;
1717

1818
static bool HasTable(hb_face_t* face, hb_tag_t tag) {
1919
hb_blob_t* table = hb_face_reference_table(face, tag);

brotli/brotli_font_diff.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#define BROTLI_BROTLI_FONT_DIFF_H_
33

44
#include "absl/status/status.h"
5-
#include "common/font_data.h"
6-
#include "common/int_set.h"
75
#include "hb-subset.h"
6+
#include "ift/common/font_data.h"
7+
#include "ift/common/int_set.h"
88

99
namespace brotli {
1010

@@ -16,23 +16,23 @@ class BrotliFontDiff {
1616
public:
1717
// Sorts the tables in face_builder into the order expected by the font
1818
// differ.
19-
static void SortForDiff(const common::IntSet& immutable_tables,
20-
const common::IntSet& custom_diff_tables,
19+
static void SortForDiff(const ift::common::IntSet& immutable_tables,
20+
const ift::common::IntSet& custom_diff_tables,
2121
const hb_face_t* original_face,
2222
hb_face_t* face_builder /* IN/OUT */);
2323

24-
BrotliFontDiff(const common::IntSet& immutable_tables,
25-
const common::IntSet& custom_diff_tables)
24+
BrotliFontDiff(const ift::common::IntSet& immutable_tables,
25+
const ift::common::IntSet& custom_diff_tables)
2626
: immutable_tables_(immutable_tables),
2727
custom_diff_tables_(custom_diff_tables) {}
2828

2929
absl::Status Diff(hb_subset_plan_t* base_plan, hb_blob_t* base,
3030
hb_subset_plan_t* derived_plan, hb_blob_t* derived,
31-
common::FontData* patch) const;
31+
ift::common::FontData* patch) const;
3232

3333
private:
34-
common::IntSet immutable_tables_;
35-
common::IntSet custom_diff_tables_;
34+
ift::common::IntSet immutable_tables_;
35+
ift::common::IntSet custom_diff_tables_;
3636
};
3737

3838
} // namespace brotli

brotli/brotli_font_diff_test.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
#include "brotli/brotli_font_diff.h"
22

33
#include "absl/types/span.h"
4-
#include "common/brotli_binary_patch.h"
5-
#include "common/int_set.h"
64
#include "gtest/gtest.h"
75
#include "hb-subset.h"
6+
#include "ift/common/brotli_binary_patch.h"
7+
#include "ift/common/int_set.h"
88

99
namespace brotli {
1010

1111
using absl::Span;
1212
using absl::Status;
13-
using common::BrotliBinaryPatch;
14-
using common::FontData;
15-
using common::IntSet;
13+
using ift::common::BrotliBinaryPatch;
14+
using ift::common::FontData;
15+
using ift::common::IntSet;
1616

17-
const std::string kTestDataDir = "common/testdata/";
17+
const std::string kTestDataDir = "ift/common/testdata/";
1818

1919
/*
2020
for debugging:

brotli/brotli_stream_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#include "brotli/brotli_stream.h"
22

33
#include "absl/types/span.h"
4-
#include "common/brotli_binary_patch.h"
54
#include "gtest/gtest.h"
5+
#include "ift/common/brotli_binary_patch.h"
66

77
namespace brotli {
88

99
using absl::Span;
1010
using absl::Status;
11-
using common::BrotliBinaryPatch;
12-
using common::FontData;
11+
using ift::common::BrotliBinaryPatch;
12+
using ift::common::FontData;
1313

1414
class BrotliStreamTest : public ::testing::Test {
1515
protected:

check-public-headers.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ echo ""
1212

1313
exit_code=0
1414

15-
if grep -q "^common/try\.h$" /tmp/public_hdrs.txt; then
16-
echo "Error: common/try.h should not be in the public headers list."
15+
if grep -q "^ift/common/try\.h$" /tmp/public_hdrs.txt; then
16+
echo "Error: ift/common/try.h should not be in the public headers list."
1717
exit_code=1
1818
fi
1919

ift/BUILD

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ cc_library(
1717
"//visibility:public",
1818
],
1919
deps = [
20-
"//common",
20+
"//ift/common",
2121
"//ift/proto",
2222
"@abseil-cpp//absl/container:btree",
2323
"@abseil-cpp//absl/container:flat_hash_map",
@@ -57,12 +57,12 @@ cc_test(
5757
"url_template_test.cc",
5858
],
5959
data = [
60-
"//common:testdata",
60+
"//ift/common:testdata",
6161
"//ift:testdata",
6262
],
6363
deps = [
6464
":ift",
65-
"//common",
65+
"//ift/common",
6666
"//ift/encoder",
6767
"//ift/proto",
6868
"@abseil-cpp//absl/container:btree",
@@ -77,13 +77,13 @@ cc_test(
7777
"integration_test.cc",
7878
],
7979
data = [
80-
"//common:testdata",
80+
"//ift/common:testdata",
8181
"//ift:testdata",
8282
],
8383
deps = [
8484
":ift",
8585
":test_segments",
86-
"//common",
86+
"//ift/common",
8787
"//ift/client:fontations",
8888
"//ift/encoder",
8989
"@abseil-cpp//absl/container:flat_hash_set",
@@ -95,7 +95,7 @@ filegroup(
9595
name = "testdata",
9696
srcs = glob(["testdata/**"]),
9797
visibility = [
98-
"//common:__subpackages__",
98+
"//ift/common:__subpackages__",
9999
"//ift:__subpackages__",
100100
],
101101
)

ift/client/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ cc_library(
1414
"//ift:__subpackages__",
1515
],
1616
deps = [
17-
"//common",
17+
"//ift/common",
1818
"//ift/encoder",
1919
"@abseil-cpp//absl/container:btree",
2020
"@abseil-cpp//absl/status",

ift/client/fontations_client.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
#include <sstream>
77

88
#include "absl/status/status.h"
9-
#include "common/axis_range.h"
10-
#include "common/font_data.h"
11-
#include "common/int_set.h"
9+
#include "ift/common/axis_range.h"
10+
#include "ift/common/font_data.h"
11+
#include "ift/common/int_set.h"
1212
#include "ift/encoder/compiler.h"
1313

1414
using absl::btree_set;
1515
using absl::flat_hash_map;
1616
using absl::Status;
1717
using absl::StatusOr;
18-
using common::AxisRange;
19-
using common::FontData;
20-
using common::IntSet;
21-
using common::make_hb_blob;
22-
using common::make_hb_face;
18+
using ift::common::AxisRange;
19+
using ift::common::FontData;
20+
using ift::common::IntSet;
21+
using ift::common::make_hb_blob;
22+
using ift::common::make_hb_face;
2323
using ift::encoder::Compiler;
2424

2525
namespace ift::client {
@@ -208,7 +208,7 @@ StatusOr<FontData> ExtendWithDesignSpace(
208208
StatusOr<FontData> Extend(const Compiler::Encoding& encoding,
209209
const IntSet& codepoints, uint32_t max_round_trips,
210210
uint32_t max_fetches) {
211-
absl::flat_hash_map<hb_tag_t, common::AxisRange> design_space;
211+
absl::flat_hash_map<hb_tag_t, ift::common::AxisRange> design_space;
212212
return ExtendWithDesignSpace(encoding, codepoints, {}, design_space, nullptr,
213213
max_round_trips, max_fetches);
214214
}

ift/client/fontations_client.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#include "absl/container/btree_set.h"
1010
#include "absl/container/flat_hash_map.h"
1111
#include "absl/status/status.h"
12-
#include "common/axis_range.h"
13-
#include "common/font_data.h"
14-
#include "common/int_set.h"
12+
#include "ift/common/axis_range.h"
13+
#include "ift/common/font_data.h"
14+
#include "ift/common/int_set.h"
1515
#include "ift/encoder/compiler.h"
1616

1717
namespace ift::client {
@@ -32,18 +32,18 @@ absl::Status ToGraph(const ift::encoder::Compiler::Encoding& encoding,
3232
* if non null, applied_uris will be populated with the set of uris that
3333
* the client ended up fetching and applying.
3434
*/
35-
absl::StatusOr<common::FontData> ExtendWithDesignSpace(
35+
absl::StatusOr<ift::common::FontData> ExtendWithDesignSpace(
3636
const ift::encoder::Compiler::Encoding& encoding,
37-
const common::IntSet& codepoints,
37+
const ift::common::IntSet& codepoints,
3838
const absl::btree_set<hb_tag_t>& feature_tags,
39-
const absl::flat_hash_map<hb_tag_t, common::AxisRange>& design_space,
39+
const absl::flat_hash_map<hb_tag_t, ift::common::AxisRange>& design_space,
4040
absl::btree_set<std::string>* applied_uris = nullptr,
4141
uint32_t max_round_trips = UINT32_MAX, uint32_t max_fetches = UINT32_MAX);
4242

43-
absl::StatusOr<common::FontData> Extend(
43+
absl::StatusOr<ift::common::FontData> Extend(
4444
const ift::encoder::Compiler::Encoding& encoding,
45-
const common::IntSet& codepoints, uint32_t max_round_trips = UINT32_MAX,
46-
uint32_t max_fetches = UINT32_MAX);
45+
const ift::common::IntSet& codepoints,
46+
uint32_t max_round_trips = UINT32_MAX, uint32_t max_fetches = UINT32_MAX);
4747

4848
} // namespace ift::client
4949

0 commit comments

Comments
 (0)