mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Get rid of easily removable uses of const_cast
This commit is contained in:
parent
893bbdfde8
commit
d58b2e879f
69 changed files with 342 additions and 306 deletions
|
|
@ -4846,10 +4846,10 @@ double TextServerAdvanced::_shaped_text_fit_to_width(const RID &p_shaped, double
|
|||
|
||||
MutexLock lock(sd->mutex);
|
||||
if (!sd->valid.is_set()) {
|
||||
const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
|
||||
_shaped_text_shape(p_shaped);
|
||||
}
|
||||
if (!sd->justification_ops_valid) {
|
||||
const_cast<TextServerAdvanced *>(this)->_shaped_text_update_justification_ops(p_shaped);
|
||||
_shaped_text_update_justification_ops(p_shaped);
|
||||
}
|
||||
|
||||
sd->fit_width_minimum_reached = false;
|
||||
|
|
@ -5003,10 +5003,10 @@ double TextServerAdvanced::_shaped_text_tab_align(const RID &p_shaped, const Pac
|
|||
|
||||
MutexLock lock(sd->mutex);
|
||||
if (!sd->valid.is_set()) {
|
||||
const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
|
||||
_shaped_text_shape(p_shaped);
|
||||
}
|
||||
if (!sd->line_breaks_valid) {
|
||||
const_cast<TextServerAdvanced *>(this)->_shaped_text_update_breaks(p_shaped);
|
||||
_shaped_text_update_breaks(p_shaped);
|
||||
}
|
||||
|
||||
for (int i = 0; i < p_tab_stops.size(); i++) {
|
||||
|
|
@ -6596,7 +6596,7 @@ const Glyph *TextServerAdvanced::_shaped_text_sort_logical(const RID &p_shaped)
|
|||
|
||||
MutexLock lock(sd->mutex);
|
||||
if (!sd->valid.is_set()) {
|
||||
const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
|
||||
_shaped_text_shape(p_shaped);
|
||||
}
|
||||
|
||||
if (!sd->sort_valid) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue