mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-04 05:31:06 +00:00
Fix Casting Bug
Add a const version of getFpValPtr to avoid a cast-away-const warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172467 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5a80eefdf7
commit
4ee576fac3
@ -66,10 +66,12 @@ namespace {
|
||||
bool insaneIntVal(int V) { return V > 4 || V < -4; }
|
||||
APFloat *getFpValPtr(void)
|
||||
{ return reinterpret_cast<APFloat*>(&FpValBuf.buffer[0]); }
|
||||
const APFloat *getFpValPtr(void) const
|
||||
{ return reinterpret_cast<const APFloat*>(&FpValBuf.buffer[0]); }
|
||||
|
||||
const APFloat &getFpVal(void) const {
|
||||
assert(IsFp && BufHasFpVal && "Incorret state");
|
||||
return *reinterpret_cast<const APFloat*>(&FpValBuf.buffer[0]);
|
||||
return *getFpValPtr();
|
||||
}
|
||||
|
||||
APFloat &getFpVal(void)
|
||||
|
Loading…
Reference in New Issue
Block a user