Skip to content

Commit

Permalink
Remove some casts.
Browse files Browse the repository at this point in the history
  • Loading branch information
redstar committed May 10, 2014
1 parent 8bcfbcf commit ec63589
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gen/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ void Module::buildTargetFiles(bool singleObj)
hdrfile = Module::buildFilePath(global.params.hdrname, global.params.hdrdir, global.hdr_ext);

// safety check: never allow obj, doc or hdr file to have the source file's name
if (Port::stricmp(FileName::name(objfile->name->str), FileName::name((char*)this->arg)) == 0) {
if (Port::stricmp(FileName::name(objfile->name->str), FileName::name(this->arg)) == 0) {
error("Output object files with the same name as the source file are forbidden");
fatal();
}
if (docfile && Port::stricmp(FileName::name(docfile->name->str), FileName::name((char*)this->arg)) == 0) {
if (docfile && Port::stricmp(FileName::name(docfile->name->str), FileName::name(this->arg)) == 0) {
error("Output doc files with the same name as the source file are forbidden");
fatal();
}
if (hdrfile && Port::stricmp(FileName::name(hdrfile->name->str), FileName::name((char*)this->arg)) == 0) {
if (hdrfile && Port::stricmp(FileName::name(hdrfile->name->str), FileName::name(this->arg)) == 0) {
error("Output header files with the same name as the source file are forbidden");
fatal();
}
Expand All @@ -140,13 +140,13 @@ File* Module::buildFilePath(const char* forcename, const char* path, const char*
argobj = forcename;
} else {
if (preservePaths)
argobj = (char*)this->arg;
argobj = this->arg;
else
argobj = FileName::name((char*)this->arg);
argobj = FileName::name(this->arg);

if (fqnNames) {
char *name = md ? md->toChars() : toChars();
argobj = FileName::replaceName((char*)argobj, name);
argobj = FileName::replaceName(argobj, name);

// add ext, otherwise forceExt will make nested.module into nested.bc
size_t len = strlen(argobj);
Expand Down

0 comments on commit ec63589

Please sign in to comment.