remove state::get_idents

this was never going to be good from API standpoint, and is no
longer necessary (can use ident_count + get_ident by index with
a loop, for example)
master
Daniel Kolesa 2021-05-16 00:51:16 +02:00
parent 4fb6b9a0bc
commit d748b0e671
2 changed files with 0 additions and 19 deletions

View File

@ -389,12 +389,6 @@ struct LIBCUBESCRIPT_EXPORT state {
);
}
/** @brief Get a span of all idents */
span_type<ident *> get_idents();
/** @brief Get a span of all idents */
span_type<ident const *> get_idents() const;
/** @brief Compile a string.
*
* This compiles the given string, optionally using `source` as a filename

View File

@ -346,19 +346,6 @@ LIBCUBESCRIPT_EXPORT ident const &state::get_ident(std::size_t index) const {
return *p_tstate->istate->identmap[index];
}
LIBCUBESCRIPT_EXPORT span_type<ident *> state::get_idents() {
return span_type<ident *>{
p_tstate->istate->identmap.data(),
p_tstate->istate->identmap.size()
};
}
LIBCUBESCRIPT_EXPORT span_type<ident const *> state::get_idents() const {
auto ptr = const_cast<ident const **>(p_tstate->istate->identmap.data());
return span_type<ident const *>{ptr, p_tstate->istate->identmap.size()};
}
LIBCUBESCRIPT_EXPORT void state::clear_override(ident &id) {
if (!id.is_overridden(*this)) {
return;