Merge pull request #1007 from Azaezel/alpha41/miscFixes08-04-2023

misc warn fixes
This commit is contained in:
Brian Roberts 2023-04-08 14:19:35 -05:00 committed by GitHub
commit 43b38bb8fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View file

@ -564,9 +564,9 @@ TORQUE_NOINLINE void doSlowIntegerOp()
// Logical Op // Logical Op
if constexpr (Op == IntegerOperation::LogicalAnd) if constexpr (Op == IntegerOperation::LogicalAnd)
stack[_STK - 1].setInt(a.getInt() && b.getInt()); stack[_STK - 1].setBool(a.getInt() && b.getInt());
if constexpr (Op == IntegerOperation::LogicalOr) if constexpr (Op == IntegerOperation::LogicalOr)
stack[_STK - 1].setInt(a.getInt() || b.getInt()); stack[_STK - 1].setBool(a.getInt() || b.getInt());
_STK--; _STK--;
} }
@ -593,9 +593,9 @@ TORQUE_FORCEINLINE void doIntOperation()
// Logical Op // Logical Op
if constexpr (Op == IntegerOperation::LogicalAnd) if constexpr (Op == IntegerOperation::LogicalAnd)
stack[_STK - 1].setFastInt(a.getFastInt() && b.getFastInt()); stack[_STK - 1].setBool(a.getFastInt() && b.getFastInt());
if constexpr (Op == IntegerOperation::LogicalOr) if constexpr (Op == IntegerOperation::LogicalOr)
stack[_STK - 1].setFastInt(a.getFastInt() || b.getFastInt()); stack[_STK - 1].setBool(a.getFastInt() || b.getFastInt());
_STK--; _STK--;
} }
@ -1344,7 +1344,7 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
break; break;
case OP_NOT: case OP_NOT:
stack[_STK].setInt(!stack[_STK].getInt()); stack[_STK].setBool(!stack[_STK].getInt());
break; break;
case OP_NOTF: case OP_NOTF:

View file

@ -618,13 +618,13 @@ bool MountSystem::_dumpDirectories(DirectoryRef directory, Vector<StringTableEnt
// So if we queried for data/ and are currently processing data/ExampleModule/datablocks we want to output // So if we queried for data/ and are currently processing data/ExampleModule/datablocks we want to output
// ExampleModule/datablocks // ExampleModule/datablocks
Path newDirectoryPath; Path newDirectoryPath;
for (U32 iteration = basePathDirectoryCount; iteration < directoryPath.getDirectoryCount(); ++iteration) for (U32 subIteration = basePathDirectoryCount; subIteration < directoryPath.getDirectoryCount(); ++subIteration)
{ {
if (iteration > basePathDirectoryCount) if (subIteration > basePathDirectoryCount)
{ {
newDirectoryPath.setPath(newDirectoryPath.getPath() + "/"); newDirectoryPath.setPath(newDirectoryPath.getPath() + "/");
} }
newDirectoryPath.setPath(newDirectoryPath.getPath() + directoryPath.getDirectory(iteration)); newDirectoryPath.setPath(newDirectoryPath.getPath() + directoryPath.getDirectory(subIteration));
} }
newDirectoryPath.setFileName(directoryPath.getFileName()); newDirectoryPath.setFileName(directoryPath.getFileName());