Format like smack-a-brother, and write comments as sentences
Four-space indents, braces on their own lines, and one-statement bodies without braces. Semicolons in comments became full stops. Designated initializers may leave fields out without a warning.
This commit is contained in:
1 parent
40f6b554b5
commit
7afdf709c3
176 files changed
+20500
-19048
No files matched your search
+15
-6
@@ -3,17 +3,26 @@
|
||||
#include <SDL3/SDL_clipboard.h>
|
||||
#include <SDL3/SDL_stdinc.h>
|
||||
|
||||
Clipboard::Clipboard() { set(""); }
|
||||
Clipboard::Clipboard()
|
||||
{
|
||||
set("");
|
||||
}
|
||||
|
||||
std::string Clipboard::get()
|
||||
{
|
||||
std::string Clipboard::get()
|
||||
{
|
||||
auto text = SDL_GetClipboardText();
|
||||
auto string = std::string(text);
|
||||
SDL_free(text);
|
||||
|
||||
return string;
|
||||
}
|
||||
}
|
||||
|
||||
bool Clipboard::is_empty() { return !SDL_HasClipboardText(); }
|
||||
bool Clipboard::is_empty()
|
||||
{
|
||||
return !SDL_HasClipboardText();
|
||||
}
|
||||
|
||||
void Clipboard::set(const std::string& string) { SDL_SetClipboardText(string.c_str()); }
|
||||
void Clipboard::set(const std::string& string)
|
||||
{
|
||||
SDL_SetClipboardText(string.c_str());
|
||||
}
|
||||
Reference in new issue
Block a user