minor from clang-tidy

This commit is contained in:
Erik Frojdh 2020-02-04 10:36:03 +01:00
parent b9446f40d1
commit 40bfca588b
4 changed files with 9 additions and 15 deletions

View File

@ -217,7 +217,7 @@ void ClientInterface::modeNotImplemented(const std::string &modename,
}
template <typename T>
void ClientInterface::validate(T arg, T retval, std::string modename,
void ClientInterface::validate(T arg, T retval, const std::string& modename,
numberMode hex) {
if (ret == OK && arg != -1 && retval != arg) {
auto format = (hex == HEX) ? std::hex : std::dec;

View File

@ -45,7 +45,7 @@ class ClientInterface : private virtual slsDetectorDefs {
void functionNotImplemented();
void modeNotImplemented(const std::string& modename, int mode);
template <typename T>
void validate(T arg, T retval, std::string modename, numberMode hex);
void validate(T arg, T retval, const std::string& modename, numberMode hex);
void verifyLock();
void verifyIdle(sls::ServerInterface &socket);

View File

@ -76,19 +76,13 @@ void Fifo::DestroyFifos(){
free(memory);
memory = nullptr;
}
if (fifoBound) {
delete fifoBound;
fifoBound = nullptr;
}
if (fifoFree) {
delete fifoFree;
fifoFree = nullptr;
}
if (fifoStream) {
delete fifoStream;
fifoStream = nullptr;
}
}
void Fifo::FreeAddress(char*& address) {

View File

@ -66,7 +66,7 @@ void ThreadObject::SetThreadPriority(int priority) {
struct sched_param param;
param.sched_priority = priority;
if (pthread_setschedparam(threadObject->native_handle(), SCHED_FIFO, &param) == EPERM) {
if (!index) {
if (index == 0) {
FILE_LOG(logWARNING) << "Could not prioritize " << type << " thread. "
"(No Root Privileges?)";
}