diff --git a/src/csync/csync_util.cpp b/src/csync/csync_util.cpp index 6f56a7e18f..c0d9031b2c 100644 --- a/src/csync/csync_util.cpp +++ b/src/csync/csync_util.cpp @@ -43,24 +43,6 @@ typedef struct { enum csync_instructions_e instr_code; } _instr_code_struct; -static const _instr_code_struct _instr[] = -{ - { "INSTRUCTION_NONE", CSYNC_INSTRUCTION_NONE }, - { "INSTRUCTION_EVAL", CSYNC_INSTRUCTION_EVAL }, - { "INSTRUCTION_REMOVE", CSYNC_INSTRUCTION_REMOVE }, - { "INSTRUCTION_RENAME", CSYNC_INSTRUCTION_RENAME }, - { "INSTRUCTION_EVAL_RENAME", CSYNC_INSTRUCTION_EVAL_RENAME }, - { "INSTRUCTION_NEW", CSYNC_INSTRUCTION_NEW }, - { "INSTRUCTION_CONFLICT", CSYNC_INSTRUCTION_CONFLICT }, - { "INSTRUCTION_IGNORE", CSYNC_INSTRUCTION_IGNORE }, - { "INSTRUCTION_SYNC", CSYNC_INSTRUCTION_SYNC }, - { "INSTRUCTION_STAT_ERR", CSYNC_INSTRUCTION_STAT_ERROR }, - { "INSTRUCTION_ERROR", CSYNC_INSTRUCTION_ERROR }, - { "INSTRUCTION_TYPE_CHANGE", CSYNC_INSTRUCTION_TYPE_CHANGE }, - { "INSTRUCTION_UPDATE_METADATA", CSYNC_INSTRUCTION_UPDATE_METADATA }, - { nullptr, CSYNC_INSTRUCTION_ERROR } -}; - struct csync_memstat_s { int size; int resident; @@ -71,21 +53,6 @@ struct csync_memstat_s { int dt; }; -const char *csync_instruction_str(enum csync_instructions_e instr) -{ - int idx = 0; - - while (_instr[idx].instr_str != nullptr) { - if (_instr[idx].instr_code == instr) { - return _instr[idx].instr_str; - } - idx++; - } - - return "ERROR!"; -} - - void csync_memstat_check(void) { int s = 0; struct csync_memstat_s m; diff --git a/src/csync/csync_util.h b/src/csync/csync_util.h index a8458df5dc..c2dcaaef04 100644 --- a/src/csync/csync_util.h +++ b/src/csync/csync_util.h @@ -26,8 +26,6 @@ #include "csync.h" -const char OCSYNC_EXPORT *csync_instruction_str(enum csync_instructions_e instr); - void OCSYNC_EXPORT csync_memstat_check(void); /* Returns true if we're reasonably certain that hash equality diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index b9c77c80db..71487f128e 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -1121,7 +1121,7 @@ void ProcessDirectoryJob::processFileFinalize( item->_direction = _dirItem->_direction; } - qCInfo(lcDisco) << "Discovered" << item->_file << csync_instruction_str(item->_instruction) << item->_direction << item->_type; + qCInfo(lcDisco) << "Discovered" << item->_file << item->_instruction << item->_direction << item->_type; if (item->isDirectory() && item->_instruction == CSYNC_INSTRUCTION_SYNC) item->_instruction = CSYNC_INSTRUCTION_UPDATE_METADATA; diff --git a/src/libsync/owncloudpropagator.h b/src/libsync/owncloudpropagator.h index 4d46f1432c..cc5a1e403a 100644 --- a/src/libsync/owncloudpropagator.h +++ b/src/libsync/owncloudpropagator.h @@ -191,8 +191,7 @@ public: if (_state != NotYetStarted) { return false; } - const char *instruction_str = csync_instruction_str(_item->_instruction); - qCInfo(lcPropagator) << "Starting" << instruction_str << "propagation of" << _item->destination() << "by" << this; + qCInfo(lcPropagator) << "Starting" << _item->_instruction << "propagation of" << _item->destination() << "by" << this; _state = Running; QMetaObject::invokeMethod(this, "start"); // We could be in a different thread (neon jobs)