diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-03-26 11:11:18 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-03-26 11:11:18 +0100 |
commit | 18d7d8d4cecaed1143b2e09b192b406762bf4c2f (patch) | |
tree | e7875c4c8557673ba2e68b257bb845cf99ccc28c /src | |
parent | a7f8f3cee4c36590ff5e7ddc775fc1bfd4d03223 (diff) |
add height in search chooser
Diffstat (limited to 'src')
-rw-r--r-- | src/choose_hill.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/choose_hill.cxx b/src/choose_hill.cxx index 9887f59..7f59d68 100644 --- a/src/choose_hill.cxx +++ b/src/choose_hill.cxx @@ -18,11 +18,15 @@ choose_hill(const Hills *hills, const char *l) { h_sort->sort_name(); for (int i=0; i<h_sort->get_num(); i++) { + char buf[256]; + Hill *m = h_sort->get(i); if (m->flags & (Hill::DUPLICATE | Hill::TRACK_POINT)) continue; - sc->add(m->name, m); + snprintf(buf, sizeof(buf) - 1, "%s (%dm)", m->name, (int) m->height); + buf[sizeof(buf) - 1] = '\0'; + sc->add(buf, m); } delete h_sort; |