mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 09:05:19 +02:00
Make string to v3f parsing consistent, replace core.setting_get_pos()
by core.settings:get_pos()
(#15438)
Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <cctype>
|
||||
#include <cwctype>
|
||||
#include <unordered_map>
|
||||
#include <optional>
|
||||
|
||||
class Translations;
|
||||
|
||||
@@ -789,9 +790,9 @@ std::string sanitize_untrusted(std::string_view str, bool keep_escapes = true);
|
||||
void safe_print_string(std::ostream &os, std::string_view str);
|
||||
|
||||
/**
|
||||
* Parses a string of form `(1, 2, 3)` to a v3f
|
||||
* Parses a string of form `(1, 2, 3)` or `1, 2, 4` to a v3f
|
||||
*
|
||||
* @param str string
|
||||
* @return float vector
|
||||
*/
|
||||
v3f str_to_v3f(std::string_view str);
|
||||
std::optional<v3f> str_to_v3f(std::string_view str);
|
||||
|
Reference in New Issue
Block a user