Skip to content

Commit 82459fb

Browse files
committed
deal with -Wunqualified-std-casts-call
Signed-off-by: Wolfgang Bumiller <[email protected]>
1 parent efde253 commit 82459fb

File tree

6 files changed

+16
-18
lines changed

6 files changed

+16
-18
lines changed

src/daemon.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ finishClientRemoval(int fd) {
227227
static void
228228
queueCommand(int clientfd, string line)
229229
{
230-
gCommandQueue.emplace_back(Command{clientfd, move(line)});
230+
gCommandQueue.emplace_back(Command{clientfd, std::move(line)});
231231
}
232232

233233

@@ -281,7 +281,7 @@ newCommandClient(Socket& server)
281281
[fd]() { disconnectClient(fd); },
282282
[fd]() { finishClientRemoval(fd); },
283283
};
284-
gCommandClients.emplace(fd, move(bufhandle));
284+
gCommandClients.emplace(fd, std::move(bufhandle));
285285
}
286286

287287
#pragma clang diagnostic push
@@ -522,7 +522,7 @@ addDevice(const string& name, const char *path)
522522
},
523523
[=]() { finishDeviceRemoval(weakdevptr); },
524524
};
525-
gInputs.emplace(name, move(input));
525+
gInputs.emplace(name, std::move(input));
526526
} catch (const std::exception&) {
527527
freeInputID(id);
528528
throw;
@@ -575,7 +575,7 @@ addOutput_Finish(const string& name, IOHandle handle, bool skip_announce)
575575
writeHello(fd);
576576
if (!skip_announce)
577577
announceAllDevices(fd);
578-
gOutputs.emplace(name, move(handle));
578+
gOutputs.emplace(name, std::move(handle));
579579
gFDCBs.emplace(fd, FDCallbacks {
580580
[fd]() {
581581
::fprintf(stderr, "onRead on output");
@@ -665,7 +665,7 @@ addOutput(const string& name, const char *path, bool skip_announce)
665665
else
666666
handle = addOutput_Open(path);
667667

668-
return addOutput_Finish(name, move(handle), skip_announce);
668+
return addOutput_Finish(name, std::move(handle), skip_announce);
669669
}
670670

671671
static void
@@ -727,7 +727,7 @@ addHotkey(uint16_t device, uint16_t type, uint16_t code, int32_t value,
727727
throw MsgException("unknown event type: %u", type);
728728

729729

730-
gHotkeys[HotkeyDef{device, type, code, value}] = move(command);
730+
gHotkeys[HotkeyDef{device, type, code, value}] = std::move(command);
731731
}
732732

733733
static void
@@ -1081,7 +1081,7 @@ clientCommand_Action(int clientfd, const vector<string>& args)
10811081
else
10821082
toClient(clientfd, "added on-'%s' command\n",
10831083
action.c_str());
1084-
gEventCommands[action] = move(cmdstring);
1084+
gEventCommands[action] = std::move(cmdstring);
10851085
}
10861086
else
10871087
throw MsgException("'action': unknown subcommand: %s",
@@ -1209,7 +1209,7 @@ parseClientCommand(int clientfd, const char *cmd, size_t length)
12091209
}
12101210
} while (*cmd && !isWhite(*cmd) && (escape || *cmd != ';'));
12111211
arg.append(beg, cmd);
1212-
args.emplace_back(move(arg));
1212+
args.emplace_back(std::move(arg));
12131213
escape = false;
12141214
}
12151215

src/main.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -697,15 +697,15 @@ cmd_create(int argc, char **argv)
697697
if (optDuplicates == DuplicateMode::Replace) {
698698
auto dev =
699699
OutDevice::newFromNE2AddCommand(infd, pkt);
700-
devices[pkt.add_device.id] = move(dev);
700+
devices[pkt.add_device.id] = std::move(dev);
701701
break;
702702
}
703703

704704
auto old = devices.find(pkt.add_device.id);
705705
if (old == devices.end()) {
706706
auto dev =
707707
OutDevice::newFromNE2AddCommand(infd, pkt);
708-
devices[pkt.add_device.id] = move(dev);
708+
devices[pkt.add_device.id] = std::move(dev);
709709
break;
710710
}
711711

src/main.h

-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
#include <memory>
3232
#include <functional>
3333

34-
using std::move;
35-
3634
#include "config.h"
3735
#include "types.h"
3836
#include "iohandle.h"

src/reader.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ InDevice::InDevice(InDevice&& o)
1414
, eof_(o.eof_)
1515
, grabbing_(o.grabbing_)
1616
, user_dev_(o.user_dev_)
17-
, name_(move(o.name_))
18-
, evbits_(move(o.evbits_))
17+
, name_(std::move(o.name_))
18+
, evbits_(std::move(o.evbits_))
1919
{
2020
o.fd_ = -1;
2121
}

src/utils.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
struct ScopeGuard {
1111
ScopeGuard() = delete;
12-
ScopeGuard(ScopeGuard&& o) : f_(move(o.f_)) {}
12+
ScopeGuard(ScopeGuard&& o) : f_(std::move(o.f_)) {}
1313
ScopeGuard(const ScopeGuard&) = delete;
1414
ScopeGuard(std::function<void()> f) : f_(f) {}
1515
~ScopeGuard() { f_(); }
@@ -19,7 +19,7 @@ struct ScopeGuard {
1919
struct ScopeGuardHelper { // actually gets rid of an unused-variable warning
2020
constexpr ScopeGuardHelper() {}
2121
ScopeGuard operator+(std::function<void()> f) {
22-
return {move(f)};
22+
return {std::move(f)};
2323
}
2424
};
2525
#define NE2_CPP_CAT_INDIR(X,Y) X ## Y

src/writer.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ OutDevice::newFromNeteventStream(int fd)
231231
}
232232
// remember the absolute bits:
233233
if (type.code == EV_ABS)
234-
absbits = move(entrybits);
234+
absbits = std::move(entrybits);
235235
}
236236

237237
// netevent 1 dumps the key state, LED state and SW state at this point
@@ -361,7 +361,7 @@ OutDevice::newFromNE2AddCommand(int fd, NE2Packet& pkt, bool skip)
361361
}
362362

363363
if (ev.index() == EV_ABS)
364-
absbits = move(entrybits);
364+
absbits = std::move(entrybits);
365365
}
366366

367367
struct {

0 commit comments

Comments
 (0)