Skip to content

Commit d9264f5

Browse files
committed
Remove code that has been deprecated for a while
1 parent 4ee2896 commit d9264f5

21 files changed

+31
-727
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,36 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1515

1616
### Fixed
1717

18+
### Removed deprecated parts of the code
19+
20+
Several parts of libosmium have been marked deprecated, many of them for a very
21+
long time. These are now removed:
22+
23+
* Sparsehash index class `osmium::index::map::SparseMemTable` as well as the
24+
complete file `osmium/index/map/sparse_mem_table.hpp`.
25+
* Callback functionality of the `osmium::memory::Buffer` class. The
26+
`set_full_callback()` will not be available any more. See the source
27+
for replacement options.
28+
* Various `osmium::builder::build_*` functions in
29+
`osmium/builder/builder_helper.hpp`. Use `osmium::builder::add_*`
30+
functions instead. Removes `builder_helper.hpp`.
31+
* `osmium::builder::Builder::add_item(const osmium::memory::Item* item)`.
32+
Use the function of the same name taking a reference instead.
33+
* `osmium::builder::OSMObject/ChangesetBuilder::add_user()`. Use
34+
`set_user()` instead.
35+
* `osmium::builder::ChangesetBuilder::bounds()` returning a modifiable
36+
reference. Use `set_bounds()` instead.
37+
* Several functions around `osmium::io::OutputIterator`.
38+
* `osmium::Area::inner_ring_cbegin/cend()`, use `inner_rings()` instead.
39+
* `osmium::RelationMember::ref()`, use `set_ref()` instead.
40+
* Implicit conversion from `osmium::Timestamp` to `std::time_t`. Use
41+
`seconds_since_epoch()` instead.
42+
* `osmium::string_to_user_id()`, use `string_to_uid` instead.
43+
* `osmium::static_cast_with_assert()` helper functions as well as the
44+
complete include file `osmium/util/cast.hpp`.
45+
* Some constructors of `osmium::util::MemoryMapping` and
46+
`osmium::util::TypedMemoryMapping`. Use other constructor instead.
47+
1848

1949
## [2.17.3] - 2022-01-19
2050

include/osmium/area/assembler_config.hpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ DEALINGS IN THE SOFTWARE.
3333
3434
*/
3535

36-
#include <osmium/util/compatibility.hpp>
37-
3836
namespace osmium {
3937

4038
namespace area {
@@ -135,16 +133,6 @@ namespace osmium {
135133
debug_level(d) {
136134
}
137135

138-
/**
139-
* Enable or disable debug output to stderr. This is for Osmium
140-
* developers only.
141-
*
142-
* @deprecated Set debug_level directly.
143-
*/
144-
OSMIUM_DEPRECATED void enable_debug_output(bool d = true) {
145-
debug_level = d;
146-
}
147-
148136
}; // struct AssemblerConfig
149137

150138
} // namespace area

include/osmium/builder/builder.hpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ DEALINGS IN THE SOFTWARE.
3535

3636
#include <osmium/memory/buffer.hpp>
3737
#include <osmium/memory/item.hpp>
38-
#include <osmium/util/compatibility.hpp>
3938

4039
#include <algorithm>
4140
#include <cassert>
@@ -187,18 +186,6 @@ namespace osmium {
187186
return append(str, static_cast<osmium::memory::item_size_type>(std::strlen(str) + 1));
188187
}
189188

190-
/**
191-
* Append '\0' to the buffer.
192-
*
193-
* @deprecated Use append_with_zero() instead.
194-
*
195-
* @returns The number of bytes appended (always 1).
196-
*/
197-
OSMIUM_DEPRECATED osmium::memory::item_size_type append_zero() {
198-
*reserve_space(1) = '\0';
199-
return 1;
200-
}
201-
202189
public:
203190

204191
Builder(const Builder&) = delete;
@@ -221,15 +208,6 @@ namespace osmium {
221208
add_size(item.padded_size());
222209
}
223210

224-
/**
225-
* @deprecated Use the version of add_item() taking a
226-
* reference instead.
227-
*/
228-
OSMIUM_DEPRECATED void add_item(const osmium::memory::Item* item) {
229-
assert(item);
230-
add_item(*item);
231-
}
232-
233211
}; // class Builder
234212

235213
} // namespace builder

include/osmium/builder/builder_helper.hpp

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

include/osmium/builder/osm_object_builder.hpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ DEALINGS IN THE SOFTWARE.
4848
#include <osmium/osm/timestamp.hpp>
4949
#include <osmium/osm/types.hpp>
5050
#include <osmium/osm/way.hpp>
51-
#include <osmium/util/compatibility.hpp>
5251

5352
#include <algorithm>
5453
#include <cassert>
@@ -488,12 +487,6 @@ namespace osmium {
488487
return set_user(user.data(), static_cast<string_size_type>(user.size()));
489488
}
490489

491-
/// @deprecated Use set_user(...) instead.
492-
template <typename... TArgs>
493-
OSMIUM_DEPRECATED void add_user(TArgs&&... args) {
494-
set_user(std::forward<TArgs>(args)...);
495-
}
496-
497490
OSMIUM_FORWARD(set_id)
498491
OSMIUM_FORWARD(set_visible)
499492
OSMIUM_FORWARD(set_deleted)
@@ -648,11 +641,6 @@ namespace osmium {
648641
OSMIUM_FORWARD(set_attribute)
649642
OSMIUM_FORWARD(set_removed)
650643

651-
// @deprecated Use set_bounds() instead.
652-
OSMIUM_DEPRECATED osmium::Box& bounds() noexcept {
653-
return object().bounds();
654-
}
655-
656644
ChangesetBuilder& set_bounds(const osmium::Box& box) noexcept {
657645
object().bounds() = box;
658646
return *this;
@@ -704,12 +692,6 @@ namespace osmium {
704692
return set_user(user.data(), static_cast<string_size_type>(user.size()));
705693
}
706694

707-
/// @deprecated Use set_user(...) instead.
708-
template <typename... TArgs>
709-
OSMIUM_DEPRECATED void add_user(TArgs&&... args) {
710-
set_user(std::forward<TArgs>(args)...);
711-
}
712-
713695
}; // class ChangesetBuilder
714696

715697
#undef OSMIUM_FORWARD

include/osmium/geom/geos.hpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ DEALINGS IN THE SOFTWARE.
5454

5555
#include <osmium/geom/coordinates.hpp>
5656
#include <osmium/geom/factory.hpp>
57-
#include <osmium/util/compatibility.hpp>
5857

5958
#include <geos/geom/Coordinate.h>
6059
#include <geos/geom/CoordinateSequence.h>
@@ -116,16 +115,6 @@ namespace osmium {
116115
m_geos_factory(&geos_factory) {
117116
}
118117

119-
/**
120-
* @deprecated Do not set SRID explicitly. It will be set to the
121-
* correct value automatically.
122-
*/
123-
OSMIUM_DEPRECATED explicit GEOSFactoryImpl(int /* srid */, int srid) :
124-
m_precision_model(new geos::geom::PrecisionModel),
125-
m_our_geos_factory(new geos::geom::GeometryFactory{m_precision_model.get(), srid}),
126-
m_geos_factory(m_our_geos_factory.get()) {
127-
}
128-
129118
explicit GEOSFactoryImpl(int srid) :
130119
m_precision_model(new geos::geom::PrecisionModel),
131120
m_our_geos_factory(new geos::geom::GeometryFactory{m_precision_model.get(), srid}),

include/osmium/index/map/all.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ DEALINGS IN THE SOFTWARE.
4141
#include <osmium/index/map/sparse_file_array.hpp> // IWYU pragma: keep
4242
#include <osmium/index/map/sparse_mem_array.hpp> // IWYU pragma: keep
4343
#include <osmium/index/map/sparse_mem_map.hpp> // IWYU pragma: keep
44-
#include <osmium/index/map/sparse_mem_table.hpp> // IWYU pragma: keep
4544
#include <osmium/index/map/sparse_mmap_array.hpp> // IWYU pragma: keep
4645

4746
#endif // OSMIUM_INDEX_MAP_ALL_HPP

0 commit comments

Comments
 (0)