Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix DMD 2.055 deprecation warnings

  • Loading branch information...
commit 8fe22274461df0376f6db5aceae76956fef9a9fa 1 parent 1f0ef64
Vladimir Panteleev authored
2  abcexport.d
View
@@ -45,7 +45,7 @@ void main(string[] args)
while (*p++) {} // skip name
abc = tag.data[p-tag.data.ptr..$];
}
- std.file.write(getName(arg) ~ "-" ~ to!string(count++) ~ ".abc", abc);
+ std.file.write(stripExtension(arg) ~ "-" ~ to!string(count++) ~ ".abc", abc);
}
if (count == 0)
throw new Exception("No DoABC tags found");
4 assembler.d
View
@@ -57,7 +57,7 @@ final class Assembler
static File fromFile(string filename, string data, string[] arguments = null)
{
- return fromData(filename, data, arguments, getDirName(filename));
+ return fromData(filename, data, arguments, dirName(filename));
}
static File fromData(string name, string data, string[] arguments = null, string basePath = null)
@@ -103,7 +103,7 @@ final class Assembler
foreach (ref c; buf)
if (c == '\\')
c = '/';
- return std.path.join(getBasePath, assumeUnique(buf));
+ return buildPath(getBasePath, buf);
}
void skipWhitespace()
6 disassembler.d
View
@@ -167,10 +167,12 @@ final class RefBuilder : ASTraitsVisitor
{
auto pcontext = multiname.vQName.ns.privateIndex in refs.privateNamespaces.contexts;
if (pcontext is null)
+ {
if (abortOnUnknown)
return null;
else
return (&this)[0..1];
+ }
auto expanded = expand(refs, *pcontext, abortOnUnknown);
if (expanded is null) return null;
return expanded ~ (multiname.vQName.name.length ? [ContextItem(multiname.vQName.name)] : null); // hack
@@ -630,11 +632,11 @@ final class Disassembler
{
if (doInline)
{
- string base = dirname(mainsb.filename);
+ string base = dirName(mainsb.filename);
string full = dir ~ "/" ~ filename;
uint up = 0;
while (!full.startsWith(base))
- base = dirname(base), up++;
+ base = dirName(base), up++;
string rel = replicate("../", up) ~ full[base.length+1..$];
StringBuilder sb = new StringBuilder(full);
2  rabcasm.d
View
@@ -35,5 +35,5 @@ void main(string[] args)
assembler.assemble(arg);
}
auto abc = as.toABC();
- write(getName(args[1]) ~ ".abc", abc.write());
+ write(setExtension(args[1], "abc"), abc.write());
}
2  rabcdasm.d
View
@@ -32,7 +32,7 @@ void main(string[] args)
{
scope abc = ABCFile.read(cast(ubyte[])read(arg));
scope as = ASProgram.fromABC(abc);
- scope disassembler = new Disassembler(as, getName(arg), getName(getBaseName(arg)));
+ scope disassembler = new Disassembler(as, stripExtension(arg), stripExtension(baseName(arg)));
disassembler.disassemble();
}
}
2  swfbinexport.d
View
@@ -41,7 +41,7 @@ void main(string[] args)
enforce(tag.data.length >= 6);
ushort id = *cast(short*)tag.data.ptr;
ubyte[] bin = tag.data[6..$];
- std.file.write(format("%s-%d.bin", getName(arg), id), bin);
+ std.file.write(format("%s-%d.bin", stripExtension(arg), id), bin);
}
enforce(found, "No DefineBinaryData tags found");
}
Please sign in to comment.
Something went wrong with that request. Please try again.