Skip to content

Commit 4d721de

Browse files
authored
Fix typos (#12793)
1 parent 09ed712 commit 4d721de

File tree

8 files changed

+38
-38
lines changed

8 files changed

+38
-38
lines changed

Firestore/core/src/api/settings.cc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ std::unique_ptr<LocalCacheSettings> Settings::CopyCacheSettings(
6969
UNREACHABLE();
7070
}
7171

72-
std::unique_ptr<MemoryGargabeCollectorSettings>
72+
std::unique_ptr<MemoryGarbageCollectorSettings>
7373
MemoryCacheSettings::CopyMemoryGcSettings(
74-
const MemoryGargabeCollectorSettings& settings) {
74+
const MemoryGarbageCollectorSettings& settings) {
7575
if (settings.kind() ==
76-
MemoryGargabeCollectorSettings::MemoryGcKind::kEagerGc) {
76+
MemoryGarbageCollectorSettings::MemoryGcKind::kEagerGc) {
7777
return absl::make_unique<MemoryEagerGcSettings>(
7878
static_cast<const MemoryEagerGcSettings&>(settings));
7979
} else if (settings.kind() ==
80-
MemoryGargabeCollectorSettings::MemoryGcKind::kLruGc) {
80+
MemoryGarbageCollectorSettings::MemoryGcKind::kLruGc) {
8181
return absl::make_unique<MemoryLruGcSettings>(
8282
static_cast<const MemoryLruGcSettings&>(settings));
8383
}
@@ -107,7 +107,7 @@ MemoryLruGcSettings MemoryLruGcSettings::WithSizeBytes(int64_t size) const {
107107
}
108108

109109
MemoryCacheSettings MemoryCacheSettings::WithMemoryGarbageCollectorSettings(
110-
const MemoryGargabeCollectorSettings& settings) {
110+
const MemoryGarbageCollectorSettings& settings) {
111111
MemoryCacheSettings new_settings(*this);
112112
new_settings.settings_ = CopyMemoryGcSettings(settings);
113113
return new_settings;
@@ -157,18 +157,18 @@ bool operator==(const LocalCacheSettings& lhs, const LocalCacheSettings& rhs) {
157157
UNREACHABLE();
158158
}
159159

160-
bool operator==(const MemoryGargabeCollectorSettings& lhs,
161-
const MemoryGargabeCollectorSettings& rhs) {
160+
bool operator==(const MemoryGarbageCollectorSettings& lhs,
161+
const MemoryGarbageCollectorSettings& rhs) {
162162
if (lhs.kind() != rhs.kind()) {
163163
return false;
164164
}
165165

166-
if (lhs.kind() == MemoryGargabeCollectorSettings::MemoryGcKind::kEagerGc) {
166+
if (lhs.kind() == MemoryGarbageCollectorSettings::MemoryGcKind::kEagerGc) {
167167
return static_cast<const MemoryEagerGcSettings&>(lhs) ==
168168
static_cast<const MemoryEagerGcSettings&>(rhs);
169169
}
170170

171-
if (lhs.kind() == MemoryGargabeCollectorSettings::MemoryGcKind::kLruGc) {
171+
if (lhs.kind() == MemoryGarbageCollectorSettings::MemoryGcKind::kLruGc) {
172172
return static_cast<const MemoryLruGcSettings&>(lhs) ==
173173
static_cast<const MemoryLruGcSettings&>(rhs);
174174
}
@@ -268,7 +268,7 @@ int64_t Settings::cache_size_bytes() const {
268268
auto* memory_cache_settings =
269269
static_cast<MemoryCacheSettings*>(cache_settings_.get());
270270
if (memory_cache_settings->gc_settings().kind() ==
271-
MemoryGargabeCollectorSettings::MemoryGcKind::kLruGc) {
271+
MemoryGarbageCollectorSettings::MemoryGcKind::kLruGc) {
272272
return static_cast<const MemoryLruGcSettings&>(
273273
memory_cache_settings->gc_settings())
274274
.size_bytes();
@@ -289,7 +289,7 @@ bool Settings::gc_enabled() const {
289289
auto* memory_cache_settings =
290290
static_cast<MemoryCacheSettings*>(cache_settings_.get());
291291
return memory_cache_settings->gc_settings().kind() ==
292-
MemoryGargabeCollectorSettings::MemoryGcKind::kLruGc &&
292+
MemoryGarbageCollectorSettings::MemoryGcKind::kLruGc &&
293293
static_cast<const MemoryLruGcSettings&>(
294294
memory_cache_settings->gc_settings())
295295
.size_bytes() != CacheSizeUnlimited;

Firestore/core/src/api/settings.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -133,38 +133,38 @@ class PersistentCacheSettings : public LocalCacheSettings {
133133
int64_t size_bytes_;
134134
};
135135

136-
class MemoryGargabeCollectorSettings {
136+
class MemoryGarbageCollectorSettings {
137137
public:
138138
enum class MemoryGcKind { kEagerGc, kLruGc };
139-
virtual ~MemoryGargabeCollectorSettings() = default;
140-
friend bool operator==(const MemoryGargabeCollectorSettings& lhs,
141-
const MemoryGargabeCollectorSettings& rhs);
139+
virtual ~MemoryGarbageCollectorSettings() = default;
140+
friend bool operator==(const MemoryGarbageCollectorSettings& lhs,
141+
const MemoryGarbageCollectorSettings& rhs);
142142
virtual size_t Hash() const = 0;
143143

144144
MemoryGcKind kind() const {
145145
return kind_;
146146
}
147147

148148
protected:
149-
explicit MemoryGargabeCollectorSettings(MemoryGcKind kind) : kind_(kind) {
149+
explicit MemoryGarbageCollectorSettings(MemoryGcKind kind) : kind_(kind) {
150150
}
151151
MemoryGcKind kind_;
152152
};
153153

154-
class MemoryEagerGcSettings : public MemoryGargabeCollectorSettings {
154+
class MemoryEagerGcSettings : public MemoryGarbageCollectorSettings {
155155
public:
156156
MemoryEagerGcSettings()
157-
: MemoryGargabeCollectorSettings(
158-
MemoryGargabeCollectorSettings::MemoryGcKind::kEagerGc) {
157+
: MemoryGarbageCollectorSettings(
158+
MemoryGarbageCollectorSettings::MemoryGcKind::kEagerGc) {
159159
}
160160
size_t Hash() const override;
161161
};
162162

163-
class MemoryLruGcSettings : public MemoryGargabeCollectorSettings {
163+
class MemoryLruGcSettings : public MemoryGarbageCollectorSettings {
164164
public:
165165
MemoryLruGcSettings()
166-
: MemoryGargabeCollectorSettings(
167-
MemoryGargabeCollectorSettings::MemoryGcKind::kLruGc),
166+
: MemoryGarbageCollectorSettings(
167+
MemoryGarbageCollectorSettings::MemoryGcKind::kLruGc),
168168
size_bytes_(Settings::DefaultCacheSizeBytes) {
169169
}
170170

@@ -193,17 +193,17 @@ class MemoryCacheSettings : public LocalCacheSettings {
193193
size_t Hash() const override;
194194

195195
MemoryCacheSettings WithMemoryGarbageCollectorSettings(
196-
const MemoryGargabeCollectorSettings& settings);
196+
const MemoryGarbageCollectorSettings& settings);
197197

198-
const MemoryGargabeCollectorSettings& gc_settings() const {
198+
const MemoryGarbageCollectorSettings& gc_settings() const {
199199
return *settings_;
200200
}
201201

202202
private:
203-
static std::unique_ptr<MemoryGargabeCollectorSettings> CopyMemoryGcSettings(
204-
const MemoryGargabeCollectorSettings& settings);
203+
static std::unique_ptr<MemoryGarbageCollectorSettings> CopyMemoryGcSettings(
204+
const MemoryGarbageCollectorSettings& settings);
205205

206-
std::unique_ptr<MemoryGargabeCollectorSettings> settings_;
206+
std::unique_ptr<MemoryGarbageCollectorSettings> settings_;
207207
};
208208

209209
bool operator!=(const Settings& lhs, const Settings& rhs);

ReleaseTooling/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Other optional arguments:
6767
- `--no-update-pod-repo`
6868
- This is for speedups when `pod repo update` has already been run recently.
6969
- `--minimum-ios-version <minimum-ios-version>`
70-
- Change the minimimum iOS version from the default of 10.
70+
- Change the minimum iOS version from the default of 10.
7171
- `--output-dir <output-dir>`
7272
- The directory to copy the built Zip file. If this is not set, the path to the Zip file will
7373
be logged to the console.

ReleaseTooling/Sources/ManifestParser/GHAMatrixSpecCollector.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct GHAMatrixSpecCollector {
5757
if let spec = podsMap[specName] {
5858
output.append(spec)
5959
} else {
60-
print("\(specName) is not in manifiest")
60+
print("\(specName) is not in manifest")
6161
}
6262
}
6363
}

ReleaseTooling/Sources/PodspecsTester/InitializeSource.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ enum InitializeSpecTesting {
126126
for spec in specs {
127127
let specInfo = fetchPodVersion(from: URL(fileURLWithPath: spec))
128128
// Create directories `${HOME}/.cocoapods/${Pod}/${version}`
129-
let podDirURL = createPodDirctory(
129+
let podDirURL = createPodDirectory(
130130
specRepoPath: Constants.cocoapodsDir,
131131
podName: specInfo.name,
132132
version: specInfo.version
@@ -147,7 +147,7 @@ enum InitializeSpecTesting {
147147
}
148148
// Closed source podspecs, e.g. `GoogleAppMeasurement.podspec`.
149149
if path.pathExtension == "json" {
150-
// Remove both extenstions of `podspec` and `json`.
150+
// Remove both extensions of `podspec` and `json`.
151151
podName = path.deletingPathExtension().deletingPathExtension().lastPathComponent
152152
} else if path.pathExtension == "podspec" {
153153
podName = path.deletingPathExtension().lastPathComponent
@@ -197,8 +197,8 @@ enum InitializeSpecTesting {
197197
return versionMatches[0][1]
198198
}
199199

200-
private static func createPodDirctory(specRepoPath: String, podName: String,
201-
version: String) -> URL {
200+
private static func createPodDirectory(specRepoPath: String, podName: String,
201+
version: String) -> URL {
202202
guard let specRepoURL = URL(string: specRepoPath) else {
203203
fatalError("\(specRepoPath) does not exist.")
204204
}

ReleaseTooling/Sources/ZipBuilder/CocoaPodUtils.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ enum CocoaPodUtils {
433433

434434
// The third component is the version in parentheses, potentially with a `:` at the end. Let's
435435
// just strip the unused characters (including quotes) and return the version. We don't
436-
// necesarily have to match against semver since it's a non trivial regex and we don't actually
436+
// necessarily have to match against semver since it's a non trivial regex and we don't actually
437437
// care, `Podfile.lock` has a standard format that we know will be valid. Also strip out any
438438
// extra quotes.
439439
let version = components[2].trimmingCharacters(in: CharacterSet(charactersIn: "():\""))

ReleaseTooling/Sources/ZipBuilder/ResourcesManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ extension ResourcesManager {
212212
try fileManager.removeItem(at: resourceDir)
213213
} catch {
214214
print("WARNING: Failed to remove empty Resources directory while cleaning up folder " +
215-
"heirarchy: \(error)")
215+
"hierarchy: \(error)")
216216
}
217217
}
218218
}

scripts/create_spec_repo/Sources/SpecRepoBuilder/main.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public extension Date {
6060
}
6161
}
6262

63-
// SpecFiles is a wraper of dict mapping from required pods to their path. This
63+
// SpecFiles is a wrapper of dict mapping from required pods to their path. This
6464
// will also contain a sequence of installing podspecs.
6565
class SpecFiles {
6666
private var specFilesDict: [String: URL]
@@ -125,7 +125,7 @@ enum SpecRepoBuilderError: Error {
125125
case failedToPush(pods: [String])
126126
// Error occurs when a podspec is not found in the repo.
127127
case podspecNotFound(_ podspec: String, from: String)
128-
// Error occurs when a direotyr path cannot be determined.
128+
// Error occurs when a directory path cannot be determined.
129129
case pathNotFound(_ path: String)
130130
}
131131

@@ -238,7 +238,7 @@ struct SpecRepoBuilder: ParsableCommand {
238238
if depPrefix.hasSuffix(Constants.specDependencyLabel) {
239239
// e.g. In Firebase.podspec, Firebase/Core will not be considered a
240240
// dependency.
241-
// "ss.dependency 'Firebase/Core'" will be splited in
241+
// "ss.dependency 'Firebase/Core'" will be splitted in
242242
// ["ss.dependency", "'Firebase", "Core'"]
243243
let podNameRaw = String(tokens[1]).replacingOccurrences(of: "'", with: "")
244244
// In the example above, deps here will not include Firebase since

0 commit comments

Comments
 (0)