diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-12-07 18:51:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-07 18:51:18 +0100 |
| commit | 8bbeee11734d3ba8e2cf15d19cb3c302f8bfdbf2 (patch) | |
| tree | 5b6654818049a0743f62defc090e86d4327cccbb /src/xwayland/XDataSource.cpp | |
| parent | b1e5cc66bdb20b002c93479490c3a317552210b3 (diff) | |
core: Add clang-tidy (#8664)
This adds a .clang-tidy file for us.
It's not a strict requirement to be compliant, but I tuned it to be alright.
Diffstat (limited to 'src/xwayland/XDataSource.cpp')
| -rw-r--r-- | src/xwayland/XDataSource.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xwayland/XDataSource.cpp b/src/xwayland/XDataSource.cpp index c6495435..54b23937 100644 --- a/src/xwayland/XDataSource.cpp +++ b/src/xwayland/XDataSource.cpp @@ -11,7 +11,7 @@ CXDataSource::CXDataSource(SXSelection& sel_) : selection(sel_) { 1, // delete selection.window, HYPRATOMS["_WL_SELECTION"], XCB_GET_PROPERTY_TYPE_ANY, 0, 4096); - xcb_get_property_reply_t* reply = xcb_get_property_reply(g_pXWayland->pWM->connection, cookie, NULL); + xcb_get_property_reply_t* reply = xcb_get_property_reply(g_pXWayland->pWM->connection, cookie, nullptr); if (!reply) return; @@ -23,9 +23,9 @@ CXDataSource::CXDataSource(SXSelection& sel_) : selection(sel_) { auto value = (xcb_atom_t*)xcb_get_property_value(reply); for (uint32_t i = 0; i < reply->value_len; i++) { if (value[i] == HYPRATOMS["UTF8_STRING"]) - mimeTypes.push_back("text/plain;charset=utf-8"); + mimeTypes.emplace_back("text/plain;charset=utf-8"); else if (value[i] == HYPRATOMS["TEXT"]) - mimeTypes.push_back("text/plain"); + mimeTypes.emplace_back("text/plain"); else if (value[i] != HYPRATOMS["TARGETS"] && value[i] != HYPRATOMS["TIMESTAMP"]) { auto type = g_pXWayland->pWM->mimeFromAtom(value[i]); |
