summaryrefslogtreecommitdiff
path: root/drivers/unix
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2023-01-12 09:24:47 +0100
committerGitHub <noreply@github.com>2023-01-12 09:24:47 +0100
commit0e4e782ada0bdd4ef19415f82a6373e2d79f7ecc (patch)
treefb8297949960789c8d9308f27d08db44f11f728d /drivers/unix
parentdd1b3ff0890b8dfc73977cfc874a9c741e13c388 (diff)
parent86b8176864f1d9450855264bf7783467fd7b71d7 (diff)
Merge pull request #70714 from Calinou/doc-os-stdin
Improve documentation for `OS.read_string_from_stdin()`
Diffstat (limited to 'drivers/unix')
-rw-r--r--drivers/unix/os_unix.cpp10
-rw-r--r--drivers/unix/os_unix.h2
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 2f3a78a689..c37b3d9c87 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 56c4d1747f..416311307c 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;