aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-04-23 00:32:46 +0200
committerSamuel Tardieu <sam@rfc1149.net>2012-04-23 00:32:46 +0200
commit0d19a993a9d2e99bd4f0627d182870ee1606cb91 (patch)
treea0ef5b4aa718034dcdeadd0d04e2c4ef4edc60ff
parentefe2b931240f6c8353608d7d9e4af41f358b24ab (diff)
downloadcgeo-0d19a993a9d2e99bd4f0627d182870ee1606cb91.zip
cgeo-0d19a993a9d2e99bd4f0627d182870ee1606cb91.tar.gz
cgeo-0d19a993a9d2e99bd4f0627d182870ee1606cb91.tar.bz2
Remove recently introduced usage of hasWaypoints
-rw-r--r--main/src/cgeo/geocaching/export/GpxExport.java44
1 files changed, 21 insertions, 23 deletions
diff --git a/main/src/cgeo/geocaching/export/GpxExport.java b/main/src/cgeo/geocaching/export/GpxExport.java
index 5463cc4..f6c2b34 100644
--- a/main/src/cgeo/geocaching/export/GpxExport.java
+++ b/main/src/cgeo/geocaching/export/GpxExport.java
@@ -250,35 +250,33 @@ class GpxExport extends AbstractExport {
gpx.write("</wpt>");
- if (cache.hasWaypoints()) {
- for (cgWaypoint wp : cache.getWaypoints()) {
- gpx.write("<wpt lat=\"");
- gpx.write(Double.toString(wp.getCoords().getLatitude()));
- gpx.write("\" lon=\"");
- gpx.write(Double.toString(wp.getCoords().getLongitude()));
- gpx.write("\">");
+ for (cgWaypoint wp : cache.getWaypoints()) {
+ gpx.write("<wpt lat=\"");
+ gpx.write(Double.toString(wp.getCoords().getLatitude()));
+ gpx.write("\" lon=\"");
+ gpx.write(Double.toString(wp.getCoords().getLongitude()));
+ gpx.write("\">");
- gpx.write("<name>");
- gpx.write(StringEscapeUtils.escapeXml(wp.getPrefix()));
- gpx.write(StringEscapeUtils.escapeXml(cache.getGeocode().substring(2)));
- gpx.write("</name>");
+ gpx.write("<name>");
+ gpx.write(StringEscapeUtils.escapeXml(wp.getPrefix()));
+ gpx.write(StringEscapeUtils.escapeXml(cache.getGeocode().substring(2)));
+ gpx.write("</name>");
- gpx.write("<cmt />");
+ gpx.write("<cmt />");
- gpx.write("<desc>");
- gpx.write(StringEscapeUtils.escapeXml(wp.getNote()));
- gpx.write("</desc>");
+ gpx.write("<desc>");
+ gpx.write(StringEscapeUtils.escapeXml(wp.getNote()));
+ gpx.write("</desc>");
- gpx.write("<sym>");
- gpx.write(StringEscapeUtils.escapeXml(wp.getWaypointType().toString()));
- gpx.write("</sym>");
+ gpx.write("<sym>");
+ gpx.write(StringEscapeUtils.escapeXml(wp.getWaypointType().toString()));
+ gpx.write("</sym>");
- gpx.write("<type>Waypoint|");
- gpx.write(StringEscapeUtils.escapeXml(wp.getWaypointType().toString()));
- gpx.write("</type>");
+ gpx.write("<type>Waypoint|");
+ gpx.write(StringEscapeUtils.escapeXml(wp.getWaypointType().toString()));
+ gpx.write("</type>");
- gpx.write("</wpt>");
- }
+ gpx.write("</wpt>");
}
publishProgress(i + 1);