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
parent
4fb6b9a0bc
commit
d748b0e671
|
@ -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.
|
/** @brief Compile a string.
|
||||||
*
|
*
|
||||||
* This compiles the given string, optionally using `source` as a filename
|
* This compiles the given string, optionally using `source` as a filename
|
||||||
|
|
|
@ -346,19 +346,6 @@ LIBCUBESCRIPT_EXPORT ident const &state::get_ident(std::size_t index) const {
|
||||||
return *p_tstate->istate->identmap[index];
|
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) {
|
LIBCUBESCRIPT_EXPORT void state::clear_override(ident &id) {
|
||||||
if (!id.is_overridden(*this)) {
|
if (!id.is_overridden(*this)) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue