Skip to content

Commit 582f71b

Browse files
committed
Use the property attribute on a per-function basis.
Also remove the unnecessary and faulty getter of autoImportFilter.
1 parent 2402025 commit 582f71b

File tree

1 file changed

+15
-21
lines changed

1 file changed

+15
-21
lines changed

dstep/translator/IncludeHandler.d

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -121,30 +121,24 @@ class IncludeHandler
121121
imports ~= "core.stdc.config";
122122
}
123123

124-
@property{
125-
/// Makes includes that match regex filter be converted to import with prefix.
126-
void autoImportPrefix (string prefix)
127-
{
128-
this.convertIncludes = true;
129-
this.importPrefix = prefix;
130-
}
131124

132-
string autoImportPrefix ()
133-
{
134-
return this.importPrefix;
135-
}
125+
/// Makes includes that match regex filter be converted to import with prefix.
126+
@property void autoImportPrefix (string prefix)
127+
{
128+
this.convertIncludes = true;
129+
this.importPrefix = prefix;
130+
}
136131

137-
/// Makes includes that match regex filter be converted to import with prefix.
138-
void autoImportFilter (string filter)
139-
{
140-
this.convertIncludes = true;
141-
this.convertableIncludePattern = regex(filter);
142-
}
132+
@property string autoImportPrefix ()
133+
{
134+
return this.importPrefix;
135+
}
143136

144-
string autoImportFilter()
145-
{
146-
return this.convertableIncludePattern.stringof;
147-
}
137+
/// Makes includes that match regex filter be converted to import with prefix.
138+
@property void autoImportFilter (string filter)
139+
{
140+
this.convertIncludes = true;
141+
this.convertableIncludePattern = regex(filter);
148142
}
149143

150144
string[] toImports ()

0 commit comments

Comments
 (0)