mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
compile on windows
This commit is contained in:
parent
5afa502948
commit
56e4178f2d
@ -238,7 +238,7 @@ get_int64_word(int n) const {
|
|||||||
// return a partial answer if there was one.
|
// return a partial answer if there was one.
|
||||||
if (has_string_word(n)) {
|
if (has_string_word(n)) {
|
||||||
((ConfigDeclaration *)this)->check_int64_word(n);
|
((ConfigDeclaration *)this)->check_int64_word(n);
|
||||||
return _words[n]._int64;
|
return _words[n]._int_64;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ set_int64_word(int n, PN_int64 value) {
|
|||||||
set_string_word(n, strm.str());
|
set_string_word(n, strm.str());
|
||||||
|
|
||||||
_words[n]._flags |= (F_checked_int64 | F_valid_int64);
|
_words[n]._flags |= (F_checked_int64 | F_valid_int64);
|
||||||
_words[n]._int64 = value;
|
_words[n]._int_64 = value;
|
||||||
invalidate_cache();
|
invalidate_cache();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -331,7 +331,7 @@ check_int64_word(int n) {
|
|||||||
if ((word._flags & F_checked_int64) == 0) {
|
if ((word._flags & F_checked_int64) == 0) {
|
||||||
word._flags |= F_checked_int64;
|
word._flags |= F_checked_int64;
|
||||||
|
|
||||||
word._int64 = 0;
|
word._int_64 = 0;
|
||||||
bool overflow = false;
|
bool overflow = false;
|
||||||
|
|
||||||
string::const_iterator pi = word._str.begin();
|
string::const_iterator pi = word._str.begin();
|
||||||
@ -339,24 +339,24 @@ check_int64_word(int n) {
|
|||||||
++pi;
|
++pi;
|
||||||
// Negative number.
|
// Negative number.
|
||||||
while (pi != word._str.end() && isdigit(*pi)) {
|
while (pi != word._str.end() && isdigit(*pi)) {
|
||||||
PN_int64 next = word._int64 * 10 - (int)((*pi) - '0');
|
PN_int64 next = word._int_64 * 10 - (int)((*pi) - '0');
|
||||||
if ((PN_int64)(next / 10) != word._int64) {
|
if ((PN_int64)(next / 10) != word._int_64) {
|
||||||
// Overflow.
|
// Overflow.
|
||||||
overflow = true;
|
overflow = true;
|
||||||
}
|
}
|
||||||
word._int64 = next;
|
word._int_64 = next;
|
||||||
++pi;
|
++pi;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Positive number.
|
// Positive number.
|
||||||
while (pi != word._str.end() && isdigit(*pi)) {
|
while (pi != word._str.end() && isdigit(*pi)) {
|
||||||
PN_int64 next = word._int64 * 10 + (int)((*pi) - '0');
|
PN_int64 next = word._int_64 * 10 + (int)((*pi) - '0');
|
||||||
if ((PN_int64)(next / 10) != word._int64) {
|
if ((PN_int64)(next / 10) != word._int_64) {
|
||||||
// Overflow.
|
// Overflow.
|
||||||
overflow = true;
|
overflow = true;
|
||||||
}
|
}
|
||||||
word._int64 = next;
|
word._int_64 = next;
|
||||||
++pi;
|
++pi;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ private:
|
|||||||
string _str;
|
string _str;
|
||||||
bool _bool;
|
bool _bool;
|
||||||
int _int;
|
int _int;
|
||||||
PN_int64 _int64;
|
PN_int64 _int_64;
|
||||||
double _double;
|
double _double;
|
||||||
short _flags;
|
short _flags;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user