diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-12-29 21:06:11 +0100 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2023-01-11 19:57:25 +0100 |
commit | 86b8176864f1d9450855264bf7783467fd7b71d7 (patch) | |
tree | 51024e2dbb4e65125e300048af359eca89e8fd95 /drivers/unix | |
parent | a75493091823020d858fabadbfa5994da0d658cb (diff) |
Improve documentation for `OS.read_string_from_stdin()`
This makes it clearer that calls to this method are blocking.
The unused method parameter was also removed.
Diffstat (limited to 'drivers/unix')
-rw-r--r-- | drivers/unix/os_unix.cpp | 10 | ||||
-rw-r--r-- | drivers/unix/os_unix.h | 2 |
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 711fd7b962..cb51128e36 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -149,13 +149,9 @@ Vector<String> OS_Unix::get_video_adapter_driver_info() const { return Vector<String>(); } -String OS_Unix::get_stdin_string(bool p_block) { - if (p_block) { - char buff[1024]; - return String::utf8(fgets(buff, 1024, stdin)); - } - - return String(); +String OS_Unix::get_stdin_string() { + char buff[1024]; + return String::utf8(fgets(buff, 1024, stdin)); } Error OS_Unix::get_entropy(uint8_t *r_buffer, int p_bytes) { diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h index 68d2dd0042..34cea5fe63 100644 --- a/drivers/unix/os_unix.h +++ b/drivers/unix/os_unix.h @@ -51,7 +51,7 @@ public: virtual Vector<String> get_video_adapter_driver_info() const override; - virtual String get_stdin_string(bool p_block) override; + virtual String get_stdin_string() override; virtual Error get_entropy(uint8_t *r_buffer, int p_bytes) override; |