mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Update BytecodeBuilder.cpp
Clean up casts
This commit is contained in:
parent
3c01448312
commit
690a0ba649
1 changed files with 4 additions and 4 deletions
|
@ -714,7 +714,7 @@ void BytecodeBuilder::writeLineInfo(std::string& ss) const
|
||||||
// third pass: write resulting data
|
// third pass: write resulting data
|
||||||
int logspan = log2(span);
|
int logspan = log2(span);
|
||||||
|
|
||||||
writeByte(ss, static_cast<unsigned char>(logspan));
|
writeByte(ss, uint8_t(logspan));
|
||||||
|
|
||||||
uint8_t lastOffset = 0;
|
uint8_t lastOffset = 0;
|
||||||
|
|
||||||
|
@ -723,9 +723,9 @@ void BytecodeBuilder::writeLineInfo(std::string& ss) const
|
||||||
int delta = lines[i] - baseline[i >> logspan];
|
int delta = lines[i] - baseline[i >> logspan];
|
||||||
// Check delta if is a valid byte value
|
// Check delta if is a valid byte value
|
||||||
LUAU_ASSERT(delta >= 0 && delta <= 255);
|
LUAU_ASSERT(delta >= 0 && delta <= 255);
|
||||||
|
|
||||||
writeByte(ss, static_cast<uint8_t>(delta) - lastOffset);
|
writeByte(ss, uint8_t(delta) - lastOffset);
|
||||||
lastOffset = static_cast<uint8_t>(delta);
|
lastOffset = uint8_t(delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
int lastLine = 0;
|
int lastLine = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue