Possible clarification and reimplementation of Ref<T> classes (#719)

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
mr-mocap
2023-08-12 15:18:33 -04:00
committed by GitHub
parent 461d557674
commit 06ba1c10b9
3 changed files with 62 additions and 81 deletions

View File

@@ -568,7 +568,7 @@ Component Input(InputOption option) {
/// placeholder
/// ```
Component Input(StringRef content, InputOption option) {
option.content = content;
option.content = std::move(content);
return Make<InputBase>(std::move(option));
}
@@ -594,8 +594,8 @@ Component Input(StringRef content, InputOption option) {
/// placeholder
/// ```
Component Input(StringRef content, StringRef placeholder, InputOption option) {
option.content = content;
option.placeholder = placeholder;
option.content = std::move(content);
option.placeholder = std::move(placeholder);
return Make<InputBase>(std::move(option));
}