openbsd-ports/x11/xplanet/patches/patch-src_libannotate_addSatellites_cpp
2022-03-11 20:15:18 +00:00

29 lines
1.3 KiB
Plaintext

error: invalid operands to binary expression ('std::__1::basic_istream<char>' and 'nullptr_t')
Index: src/libannotate/addSatellites.cpp
--- src/libannotate/addSatellites.cpp.orig
+++ src/libannotate/addSatellites.cpp
@@ -488,10 +488,10 @@ loadSatelliteVector(PlanetProperties *planetProperties
{
ifstream inFile(tleFile.c_str());
char lines[3][80];
- while (inFile.getline(lines[0], 80) != NULL)
+ while (inFile.getline(lines[0], 80))
{
- if ((inFile.getline(lines[1], 80) == NULL)
- || (inFile.getline(lines[2], 80) == NULL))
+ if ((!inFile.getline(lines[1], 80))
+ || (!inFile.getline(lines[2], 80)))
{
ostringstream errStr;
errStr << "Malformed TLE file (" << tleFile << ")?\n";
@@ -542,7 +542,7 @@ addSatellites(PlanetProperties *planetProperties, Plan
{
ifstream inFile(satFile.c_str());
char *line = new char[MAX_LINE_LENGTH];
- while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL)
+ while (inFile.getline (line, MAX_LINE_LENGTH, '\n'))
readSatelliteFile(line, planet, view, projection,
planetProperties, annotationMap);