Skip to content

Commit

Permalink
Adjust indenting only
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5796 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Sep 10, 2006
1 parent 3f24fa9 commit c090770
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions src/providers/gpx/gpsdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,13 +330,13 @@ GPSData* GPSData::getData(const QString& filename) {
while (!file.atEnd()) {
long int readBytes = file.readBlock(buffer, bufsize);
if (file.atEnd())
atEnd = 1;
atEnd = 1;
if (!XML_Parse(p, buffer, readBytes, atEnd)) {
std::cerr<<"Parse error at line "
<<XML_GetCurrentLineNumber(p)<<": "
<<XML_ErrorString(XML_GetErrorCode(p))<<std::endl;
failed = true;
break;
std::cerr<<"Parse error at line "
<<XML_GetCurrentLineNumber(p)<<": "
<<XML_ErrorString(XML_GetErrorCode(p))<<std::endl;
failed = true;
break;
}
}
delete [] buffer;
Expand Down Expand Up @@ -391,9 +391,9 @@ bool GPXHandler::startElement(const XML_Char* qName, const XML_Char** attr) {
mWpt = Waypoint();
for (int i = 0; attr[2*i] != NULL; ++i) {
if (!std::strcmp(attr[2*i], "lat"))
mWpt.lat = QString(attr[2*i+1]).toDouble();
mWpt.lat = QString(attr[2*i+1]).toDouble();
else if (!std::strcmp(attr[2*i], "lon"))
mWpt.lon = QString(attr[2*i+1]).toDouble();
mWpt.lon = QString(attr[2*i+1]).toDouble();
}
mObj = &mWpt;
}
Expand All @@ -411,8 +411,8 @@ bool GPXHandler::startElement(const XML_Char* qName, const XML_Char** attr) {
// common properties
else if (!std::strcmp(qName, "name")) {
if (parseModes.top() == ParsingWaypoint ||
parseModes.top() == ParsingRoute ||
parseModes.top() == ParsingTrack) {
parseModes.top() == ParsingRoute ||
parseModes.top() == ParsingTrack) {
mString = &mObj->name;
mCharBuffer = "";
parseModes.push(ParsingString);
Expand All @@ -422,8 +422,8 @@ bool GPXHandler::startElement(const XML_Char* qName, const XML_Char** attr) {
}
else if (!std::strcmp(qName, "cmt")) {
if (parseModes.top() == ParsingWaypoint ||
parseModes.top() == ParsingRoute ||
parseModes.top() == ParsingTrack) {
parseModes.top() == ParsingRoute ||
parseModes.top() == ParsingTrack) {
mString = &mObj->cmt;
mCharBuffer = "";
parseModes.push(ParsingString);
Expand All @@ -433,8 +433,8 @@ bool GPXHandler::startElement(const XML_Char* qName, const XML_Char** attr) {
}
else if (!std::strcmp(qName, "desc")) {
if (parseModes.top() == ParsingWaypoint ||
parseModes.top() == ParsingRoute ||
parseModes.top() == ParsingTrack) {
parseModes.top() == ParsingRoute ||
parseModes.top() == ParsingTrack) {
mString = &mObj->desc;
mCharBuffer = "";
parseModes.push(ParsingString);
Expand All @@ -444,8 +444,8 @@ bool GPXHandler::startElement(const XML_Char* qName, const XML_Char** attr) {
}
else if (!std::strcmp(qName, "src")) {
if (parseModes.top() == ParsingWaypoint ||
parseModes.top() == ParsingRoute ||
parseModes.top() == ParsingTrack) {
parseModes.top() == ParsingRoute ||
parseModes.top() == ParsingTrack) {
mString = &mObj->src;
mCharBuffer = "";
parseModes.push(ParsingString);
Expand All @@ -455,8 +455,8 @@ bool GPXHandler::startElement(const XML_Char* qName, const XML_Char** attr) {
}
else if (!std::strcmp(qName, "url")) {
if (parseModes.top() == ParsingWaypoint ||
parseModes.top() == ParsingRoute ||
parseModes.top() == ParsingTrack) {
parseModes.top() == ParsingRoute ||
parseModes.top() == ParsingTrack) {
mString = &mObj->url;
mCharBuffer = "";
parseModes.push(ParsingString);
Expand All @@ -466,8 +466,8 @@ bool GPXHandler::startElement(const XML_Char* qName, const XML_Char** attr) {
}
else if (!std::strcmp(qName, "urlname")) {
if (parseModes.top() == ParsingWaypoint ||
parseModes.top() == ParsingRoute ||
parseModes.top() == ParsingTrack) {
parseModes.top() == ParsingRoute ||
parseModes.top() == ParsingTrack) {
mString = &mObj->urlname;
mCharBuffer = "";
parseModes.push(ParsingString);
Expand Down Expand Up @@ -516,10 +516,10 @@ bool GPXHandler::startElement(const XML_Char* qName, const XML_Char** attr) {
if (parseModes.top() == ParsingRoute) {
mRtept = Routepoint();
for (int i = 0; attr[2*i] != NULL; ++i) {
if (!std::strcmp(attr[2*i], "lat"))
mRtept.lat = QString(attr[2*i+1]).toDouble();
else if (!std::strcmp(attr[2*i], "lon"))
mRtept.lon = QString(attr[2*i+1]).toDouble();
if (!std::strcmp(attr[2*i], "lat"))
mRtept.lat = QString(attr[2*i+1]).toDouble();
else if (!std::strcmp(attr[2*i], "lon"))
mRtept.lon = QString(attr[2*i+1]).toDouble();
}
parseModes.push(ParsingRoutepoint);
}
Expand All @@ -540,10 +540,10 @@ bool GPXHandler::startElement(const XML_Char* qName, const XML_Char** attr) {
if (parseModes.top() == ParsingTrackSegment) {
mTrkpt = Trackpoint();
for (int i = 0; attr[2*i] != NULL; ++i) {
if (!std::strcmp(attr[2*i], "lat"))
mTrkpt.lat = QString(attr[2*i+1]).toDouble();
else if (!std::strcmp(attr[2*i], "lon"))
mTrkpt.lon = QString(attr[2*i+1]).toDouble();
if (!std::strcmp(attr[2*i], "lat"))
mTrkpt.lat = QString(attr[2*i+1]).toDouble();
else if (!std::strcmp(attr[2*i], "lon"))
mTrkpt.lon = QString(attr[2*i+1]).toDouble();
}
parseModes.push(ParsingTrackpoint);
}
Expand Down

0 comments on commit c090770

Please sign in to comment.