mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 22:10:36 +00:00
* BugFix: Clear a lot of warnings and correct a few actual programming errors along the way.
This commit is contained in:
parent
ef514d0e6b
commit
1b6b803a20
61 changed files with 120 additions and 118 deletions
|
|
@ -594,20 +594,20 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
|||
return currentStatus;
|
||||
|
||||
U32 finalPos = 0;
|
||||
switch (absolutePos)
|
||||
|
||||
if (absolutePos)
|
||||
{
|
||||
case true: // absolute position
|
||||
AssertFatal(0 <= position, "File::setPosition: negative absolute position");
|
||||
|
||||
// position beyond EOS is OK
|
||||
finalPos = lseek(*((int *)handle), position, SEEK_SET);
|
||||
break;
|
||||
case false: // relative position
|
||||
}
|
||||
else
|
||||
{
|
||||
AssertFatal((getPosition() >= (U32)abs(position) && 0 > position) || 0 <= position, "File::setPosition: negative relative position");
|
||||
|
||||
// position beyond EOS is OK
|
||||
finalPos = lseek(*((int *)handle), position, SEEK_CUR);
|
||||
break;
|
||||
}
|
||||
|
||||
if (0xffffffff == finalPos)
|
||||
|
|
@ -1110,7 +1110,7 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
|||
if (dip == NULL)
|
||||
return false;
|
||||
|
||||
while (d = readdir(dip))
|
||||
while ((d = readdir(dip)))
|
||||
{
|
||||
bool isDir = false;
|
||||
if (d->d_type == DT_UNKNOWN)
|
||||
|
|
@ -1229,14 +1229,14 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
|||
// Iterate through and grab valid directories
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
while (d = readdir(dip))
|
||||
while ((d = readdir(dip)))
|
||||
{
|
||||
bool isDir;
|
||||
isDir = false;
|
||||
if (d->d_type == DT_UNKNOWN)
|
||||
{
|
||||
char child [1024];
|
||||
if ((Path[dStrlen(Path) - 1] == '/'))
|
||||
if (Path[dStrlen(Path) - 1] == '/')
|
||||
dSprintf(child, 1024, "%s%s", Path, d->d_name);
|
||||
else
|
||||
dSprintf(child, 1024, "%s/%s", Path, d->d_name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue