Skip to content

Commit 4e7a1b1

Browse files
committed
delete unused stuff
1 parent 237c731 commit 4e7a1b1

File tree

6 files changed

+0
-79
lines changed

6 files changed

+0
-79
lines changed

middle-pgsql.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ void pgsql_parse_nodes(const char *string, osmium::memory::Buffer &buffer,
291291
} // anonymous namespace
292292

293293

294-
// escape means we return '\N' for copy mode, otherwise we return just nullptr
295294
void middle_pgsql_t::buffer_store_tags(osmium::OSMObject const &obj, bool attrs)
296295
{
297296
if (obj.tags().empty() && !attrs) {

output-pgsql.cpp

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@
2121
#include <ctime>
2222
#include <unistd.h>
2323

24-
#include <boost/algorithm/string/predicate.hpp>
25-
#include <boost/exception_ptr.hpp>
26-
#include <boost/format.hpp>
27-
2824
#include "expire-tiles.hpp"
2925
#include "middle.hpp"
3026
#include "node-ram-cache.hpp"
@@ -39,37 +35,6 @@
3935
#include "wildcmp.hpp"
4036
#include "wkb.hpp"
4137

42-
/* make the diagnostic information work with older versions of
43-
* boost - the function signature changed at version 1.54.
44-
*/
45-
#if BOOST_VERSION >= 105400
46-
#define BOOST_DIAGNOSTIC_INFO(e) boost::diagnostic_information((e), true)
47-
#else
48-
#define BOOST_DIAGNOSTIC_INFO(e) boost::diagnostic_information((e))
49-
#endif
50-
51-
/* example from: pg_dump -F p -t planet_osm gis
52-
COPY planet_osm (osm_id, name, place, landuse, leisure, "natural", man_made, waterway, highway, railway, amenity, tourism, learning, building, bridge, layer, way) FROM stdin;
53-
17959841 \N \N \N \N \N \N \N bus_stop \N \N \N \N \N \N -\N 0101000020E610000030CCA462B6C3D4BF92998C9B38E04940
54-
17401934 The Horn \N \N \N \N \N \N \N \N pub \N \N \N \N -\N 0101000020E6100000C12FC937140FD5BFB4D2F4FB0CE04940
55-
...
56-
57-
mine - 01 01000000 48424298424242424242424256427364
58-
psql - 01 01000020 E6100000 30CCA462B6C3D4BF92998C9B38E04940
59-
01 01000020 E6100000 48424298424242424242424256427364
60-
0x2000_0000 = hasSRID, following 4 bytes = srid, not supported by geos WKBWriter
61-
Workaround - output SRID=4326;<WKB>
62-
*/
63-
64-
65-
/*
66-
COPY planet_osm (osm_id, name, place, landuse, leisure, "natural", man_made, waterway, highway, railway, amenity, tourism, learning, bu
67-
ilding, bridge, layer, way) FROM stdin;
68-
198497 Bedford Road \N \N \N \N \N \N residential \N \N \N \N \N \N \N 0102000020E610000004000000452BF702B342D5BF1C60E63BF8DF49406B9C4D470037D5BF5471E316F3DF4940DFA815A6EF35D5BF9AE95E27F5DF4940B41EB
69-
E4C1421D5BF24D06053E7DF4940
70-
212696 Oswald Road \N \N \N \N \N \N minor \N \N \N \N \N \N \N 0102000020E610000004000000467D923B6C22D5BFA359D93EE4DF4940B3976DA7AD11D5BF84BBB376DBDF4940997FF44D9A06D5BF4223D8B8FEDF49404D158C4AEA04D
71-
5BF5BB39597FCDF4940
72-
*/
7338
void output_pgsql_t::pgsql_out_way(osmium::Way const &way, taglist_t *tags,
7439
bool polygon, bool roads)
7540
{

pgsql.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,6 @@
77
#include <memory>
88
#include <boost/format.hpp>
99

10-
void escape(const std::string &src, std::string &dst)
11-
{
12-
for (const char c: src) {
13-
switch(c) {
14-
case '\\': dst.append("\\\\"); break;
15-
//case 8: dst.append("\\\b"); break;
16-
//case 12: dst.append("\\\f"); break;
17-
case '\n': dst.append("\\\n"); break;
18-
case '\r': dst.append("\\\r"); break;
19-
case '\t': dst.append("\\\t"); break;
20-
//case 11: dst.append("\\\v"); break;
21-
default: dst.push_back(c); break;
22-
}
23-
}
24-
}
25-
2610
pg_result_t pgsql_exec_simple(PGconn *sql_conn, const ExecStatusType expect,
2711
const std::string &sql)
2812
{

pgsql.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,4 @@ int pgsql_exec(PGconn *sql_conn, const ExecStatusType expect, const char *fmt, .
3434
#endif
3535
;
3636

37-
void escape(const std::string &src, std::string& dst);
3837
#endif

tests/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ set(TESTS
2929
test-parse-extra-args.cpp
3030
test-parse-xml2.cpp
3131
test-persistent-node-cache.cpp
32-
test-pgsql-escape.cpp
3332
test-wildcard-match.cpp
3433
)
3534

@@ -51,7 +50,6 @@ set(TEST_NODB
5150
test-options-parse
5251
test-parse-diff
5352
test-parse-xml2
54-
test-pgsql-escape
5553
test-wildcard-match
5654
)
5755

tests/test-pgsql-escape.cpp

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)