Merge pull request #245 from BBasile/master

fix, 32bit compilation
This commit is contained in:
Brian Schott 2015-05-04 18:55:09 -07:00
commit 5cff02a725
1 changed files with 3 additions and 3 deletions

View File

@ -199,18 +199,18 @@ class EtagsPrinter : ASTVisitor
maketag(name.text, name.index, name.line); maketag(name.text, name.index, name.line);
} }
void maketag(string text, ulong index, ulong line) void maketag(string text, size_t index, ulong line)
{ {
// skip declaration in unittests and funcs // skip declaration in unittests and funcs
if (inUnittest || inFunc) return; if (inUnittest || inFunc) return;
// tag is a searchable string from beginning of line // tag is a searchable string from beginning of line
ulong b = index; size_t b = index;
while (b > 0 && bytes[--b] != '\n') {} while (b > 0 && bytes[--b] != '\n') {}
++b; ++b;
// tag end is one char beyond tag name // tag end is one char beyond tag name
ulong e = index + text.length; size_t e = index + text.length;
if (e < bytes.length && bytes[e] != '\n') ++e; if (e < bytes.length && bytes[e] != '\n') ++e;
auto tag = cast(char[])bytes[b..e]; auto tag = cast(char[])bytes[b..e];