@@ -110,15 +110,15 @@ void Module::buildTargetFiles(bool singleObj)
110110 hdrfile = Module::buildFilePath (global.params .hdrname , global.params .hdrdir , global.hdr_ext );
111111
112112 // safety check: never allow obj, doc or hdr file to have the source file's name
113- if (Port::stricmp (FileName::name (objfile->name ->str ), FileName::name (( char *) this ->arg )) == 0 ) {
113+ if (Port::stricmp (FileName::name (objfile->name ->str ), FileName::name (this ->arg )) == 0 ) {
114114 error (" Output object files with the same name as the source file are forbidden" );
115115 fatal ();
116116 }
117- if (docfile && Port::stricmp (FileName::name (docfile->name ->str ), FileName::name (( char *) this ->arg )) == 0 ) {
117+ if (docfile && Port::stricmp (FileName::name (docfile->name ->str ), FileName::name (this ->arg )) == 0 ) {
118118 error (" Output doc files with the same name as the source file are forbidden" );
119119 fatal ();
120120 }
121- if (hdrfile && Port::stricmp (FileName::name (hdrfile->name ->str ), FileName::name (( char *) this ->arg )) == 0 ) {
121+ if (hdrfile && Port::stricmp (FileName::name (hdrfile->name ->str ), FileName::name (this ->arg )) == 0 ) {
122122 error (" Output header files with the same name as the source file are forbidden" );
123123 fatal ();
124124 }
@@ -140,13 +140,13 @@ File* Module::buildFilePath(const char* forcename, const char* path, const char*
140140 argobj = forcename;
141141 } else {
142142 if (preservePaths)
143- argobj = ( char *) this ->arg ;
143+ argobj = this ->arg ;
144144 else
145- argobj = FileName::name (( char *) this ->arg );
145+ argobj = FileName::name (this ->arg );
146146
147147 if (fqnNames) {
148148 char *name = md ? md->toChars () : toChars ();
149- argobj = FileName::replaceName (( char *) argobj, name);
149+ argobj = FileName::replaceName (argobj, name);
150150
151151 // add ext, otherwise forceExt will make nested.module into nested.bc
152152 size_t len = strlen (argobj);
0 commit comments