diff --git a/examples/GoogleMaps/GoogleMaps.cpp b/examples/GoogleMaps/GoogleMaps.cpp index 1a4abfbee..747395dd0 100644 --- a/examples/GoogleMaps/GoogleMaps.cpp +++ b/examples/GoogleMaps/GoogleMaps.cpp @@ -106,7 +106,7 @@ String FormatDegree(double d, int decimals) char sign = (d < 0 ? '-' : '+'); if(d < 0) d = -d; int deg = ffloor(d); - String cd = ToCharset(CHARSET_DEFAULT, "%c%d°", CHARSET_UTF8); + String cd = ToCharset(CHARSET_DEFAULT, "%c%d°", CHARSET_UTF8); if(decimals <= -2) return NFormat(cd, sign, deg); d = (d - deg) * 60; diff --git a/examples/GoogleMaps/Main.cpp b/examples/GoogleMaps/Main.cpp index 6ff59db23..750413ad6 100644 --- a/examples/GoogleMaps/Main.cpp +++ b/examples/GoogleMaps/Main.cpp @@ -1,10 +1,6 @@ #include "GoogleMaps.h" GUI_APP_MAIN { - // Following key was obtained for U++ project, please get your owen key if you want to use - // GoogleMaps API here (it is free): http://code.google.com/intl/cs/apis/maps/signup.html - SetGoogleMapsKey("ABQIAAAAXHmSFgmVIbMZDJ5RhfPINBSBetkRueiarolywVmVT7jJWZRGvBQFIvrtty50ivBLt4YApjpEVXW8Hw"); - Pointf p(0, 51.477222); if(MapDlg(p)) Exclamation("Marker position " + FormatGPS(p)); diff --git a/examples/idmap/idmap.upp b/examples/idmap/idmap.upp index 5e51f30a2..b5c19603d 100644 --- a/examples/idmap/idmap.upp +++ b/examples/idmap/idmap.upp @@ -1,4 +1,4 @@ -description "U++ containers demonstration - prints the map of words in the file"; +description "U++ containers demonstration - prints the map of words in the file\377"; optimize_speed; @@ -10,3 +10,4 @@ file mainconfig "" = ""; + diff --git a/examples/idmap/init b/examples/idmap/init new file mode 100644 index 000000000..2be20282a --- /dev/null +++ b/examples/idmap/init @@ -0,0 +1,4 @@ +#ifndef _idmap_icpp_init_stub +#define _idmap_icpp_init_stub +#include "Core/init" +#endif diff --git a/examples/idmapBench/main.cpp b/examples/idmapBench/main.cpp index b397c90ca..8900a706f 100644 --- a/examples/idmapBench/main.cpp +++ b/examples/idmapBench/main.cpp @@ -12,18 +12,7 @@ #include #include #include - -#define TEST_HASHMAP - -#ifdef TEST_HASHMAP - -#ifdef COMPILER_GCC -#include -#else -#include -#endif - -#endif +#include using namespace std; using namespace Upp; @@ -126,13 +115,7 @@ void BenchMap(const char *file) #endif } -#ifdef TEST_HASHMAP - -#ifdef COMPILER_GCC -typedef std::tr1::unordered_map< string, vector > HashMap; -#else -typedef stdext::hash_map< string, vector > HashMap; -#endif +typedef std::unordered_map< string, vector > HashMap; inline bool h_less(const HashMap::value_type *a, const HashMap::value_type *b) { @@ -163,9 +146,7 @@ void BenchHashMap(const char *file) #endif } -#endif - -#define N 100 +#define N 10000 CONSOLE_APP_MAIN { @@ -179,7 +160,6 @@ CONSOLE_APP_MAIN BenchNTL(fn); // first run to cache the file -#ifdef TEST_HASHMAP { BenchHashMap(fn); TimeStop tm; @@ -187,7 +167,6 @@ CONSOLE_APP_MAIN BenchHashMap(fn); cout << "STL hash_map time: " << tm.Elapsed() << " ms \n"; } -#endif { BenchMap(fn);