mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Add nodiscard attribute to helper functions where it makes sense
This commit is contained in:
parent
e6acc4e7ed
commit
ae0f955a0e
10 changed files with 71 additions and 29 deletions
|
@ -435,12 +435,12 @@ MAKE_STREAM_WRITE_FXN(video::SColor, ARGB8, 4);
|
|||
//// More serialization stuff
|
||||
////
|
||||
|
||||
inline float clampToF1000(float v)
|
||||
[[nodiscard]] inline float clampToF1000(float v)
|
||||
{
|
||||
return core::clamp(v, F1000_MIN, F1000_MAX);
|
||||
}
|
||||
|
||||
inline v3f clampToF1000(v3f v)
|
||||
[[nodiscard]] inline v3f clampToF1000(v3f v)
|
||||
{
|
||||
return {clampToF1000(v.X), clampToF1000(v.Y), clampToF1000(v.Z)};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue