mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-14 21:05:57 +08:00
Return type must be int for GetNumberAsInt(). Fixes #258
This commit is contained in:
parent
fe77cc5cdd
commit
ff0a2e9fb4
@ -323,7 +323,8 @@ class Value {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use this function if you want to have number value as int.
|
// Use this function if you want to have number value as int.
|
||||||
double GetNumberAsInt() const {
|
// TODO(syoyo): Support int value larger than 32 bits
|
||||||
|
int GetNumberAsInt() const {
|
||||||
if (type_ == REAL_TYPE) {
|
if (type_ == REAL_TYPE) {
|
||||||
return int(real_value_);
|
return int(real_value_);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user