mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
Fix some warnings comparing char against EOF
This is not possible on platforms where char is unsigned. In cases where fail() is checked, it is also unnecessary.
This commit is contained in:
parent
ba4036e290
commit
7968022c23
@ -66,7 +66,7 @@ input(std::istream &in) {
|
||||
// Scan the tag, up to but not including the closing paren.
|
||||
std::string tag;
|
||||
in >> ch;
|
||||
while (!in.fail() && ch != EOF && ch != ')') {
|
||||
while (!in.fail() && ch != ')') {
|
||||
tag += ch;
|
||||
// We want to include embedded whitespace, so we use get().
|
||||
ch = in.get();
|
||||
@ -81,7 +81,7 @@ input(std::istream &in) {
|
||||
// Scan the date, up to but not including the closing bracket.
|
||||
if (ch != ']') {
|
||||
std::string date;
|
||||
while (!in.fail() && ch != EOF && ch != ']') {
|
||||
while (!in.fail() && ch != ']') {
|
||||
date += ch;
|
||||
ch = in.get();
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ input(std::istream &in) {
|
||||
|
||||
string date;
|
||||
ch = in.get();
|
||||
while (!in.fail() && ch != EOF && ch != '"') {
|
||||
while (!in.fail() && ch != '"') {
|
||||
date += ch;
|
||||
ch = in.get();
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ pm_getuint(istream * const ifP) {
|
||||
'unsigned int'), issue an error message to stderr and abort the
|
||||
program.
|
||||
-----------------------------------------------------------------------------*/
|
||||
char ch;
|
||||
int ch;
|
||||
unsigned int i;
|
||||
|
||||
// skip whitespace
|
||||
|
Loading…
x
Reference in New Issue
Block a user