Skip to content

Commit 89fb9bc

Browse files
authored
HtmlGeneratorInstance: remove getter indirection for writtenFiles (#1530)
1 parent c79c23e commit 89fb9bc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/src/html/html_generator_instance.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ class HtmlGeneratorInstance implements HtmlOptions {
3535
String get faviconPath => _options.faviconPath;
3636
bool get useCategories => _options.useCategories;
3737
bool get prettyIndexJson => _options.prettyIndexJson;
38+
3839
// Protect against bugs in canonicalization by tracking what files we
3940
// write.
40-
final Set<String> _writtenFiles = new Set();
41+
final Set<String> writtenFiles = new Set<String>();
4142

4243
HtmlGeneratorInstance(this._options, this._templates, this.package, this.out,
4344
this._onFileCreated);
@@ -297,8 +298,6 @@ class HtmlGeneratorInstance implements HtmlOptions {
297298
}
298299
}
299300

300-
Set<String> get writtenFiles => _writtenFiles;
301-
302301
void _build(String filename, TemplateRenderer template, TemplateData data) {
303302
String fullName = path.join(out.path, filename);
304303

@@ -307,9 +306,9 @@ class HtmlGeneratorInstance implements HtmlOptions {
307306

308307
// If you see this assert, we're probably being called to build non-canonical
309308
// docs somehow. Check data.self.isCanonical and callers for bugs.
310-
assert(!_writtenFiles.contains(fullName));
309+
assert(!writtenFiles.contains(fullName));
311310
_writeFile(fullName, content);
312-
_writtenFiles.add(fullName);
311+
writtenFiles.add(fullName);
313312
if (data.self is ModelElement) documentedElements.add(data.self);
314313
}
315314

0 commit comments

Comments
 (0)