diff --git a/clkmgr/common/message.cpp b/clkmgr/common/message.cpp index d62fb314..e0ebbbba 100644 --- a/clkmgr/common/message.cpp +++ b/clkmgr/common/message.cpp @@ -22,7 +22,7 @@ using namespace std; DECLARE_STATIC(Message::parseMsgMap); -Message::Message(decltype(msgId) msgId) +Message::Message(msgId_t msgId) { this->msgId = msgId; this->msgAck = ACK_NONE; @@ -79,7 +79,7 @@ COMMON_PRESEND_MESSAGE_TYPE(Message::presendMessage) bool Message::addMessageType(parseMsgMapElement_t mapping) { - decltype(parseMsgMap)::size_type size = parseMsgMap.size(); + std::map::size_type size = parseMsgMap.size(); parseMsgMap.insert(mapping); if(parseMsgMap.size() == size) return false; @@ -100,7 +100,7 @@ PARSE_RXBUFFER_TYPE(Message::parseBuffer) MAKE_RXBUFFER_TYPE(Message::buildMessage) { msgId_t msgId; - decltype(parseMsgMap)::iterator it; + std::map::iterator it; if(!PARSE_RX(FIELD, msgId, LxContext)) return false; it = parseMsgMap.find(msgId); diff --git a/clkmgr/common/message.hpp b/clkmgr/common/message.hpp index 1847319c..21fd8eb6 100644 --- a/clkmgr/common/message.hpp +++ b/clkmgr/common/message.hpp @@ -35,14 +35,13 @@ typedef std::pair parseMsgMapElement_t; class Message { private: - static std::map parseMsgMap; + static std::map parseMsgMap; msgId_t msgId; msgAck_t msgAck; sessionId_t sessionId; protected: - Message(decltype(msgId) msgId); + Message(msgId_t msgId); static bool addMessageType(parseMsgMapElement_t); static std::string ExtractClassName(std::string prettyFunction, std::string function); @@ -76,22 +75,22 @@ class Message virtual ~Message() = default; - const decltype(msgId) &getc_msgId() { return msgId; } - decltype(msgId) &get_msgId() { return msgId; } - void set_msgId(const decltype(msgId) &msgId) { this->msgId = msgId; } - decltype(msgId) c_get_val_msgId() const { return msgId; } + const msgId_t &getc_msgId() { return msgId; } + msgId_t &get_msgId() { return msgId; } + void set_msgId(const msgId_t &msgId) { this->msgId = msgId; } + msgId_t c_get_val_msgId() const { return msgId; } - const decltype(msgAck) &getc_msgAck() { return msgAck; } - decltype(msgAck) &get_msgAck() { return msgAck; } - void set_msgAck(const decltype(msgAck) &msgAck) { this->msgAck = msgAck; } - decltype(msgAck) c_get_val_msgAck() const { return msgAck; } + const msgAck_t &getc_msgAck() { return msgAck; } + msgAck_t &get_msgAck() { return msgAck; } + void set_msgAck(const msgAck_t &msgAck) { this->msgAck = msgAck; } + msgAck_t c_get_val_msgAck() const { return msgAck; } - const decltype(sessionId) &getc_sessionId() { return sessionId; } - decltype(sessionId) &get_sessionId() { return sessionId; } - void set_sessionId(const decltype(sessionId) &sessionId) { + const sessionId_t &getc_sessionId() { return sessionId; } + sessionId_t &get_sessionId() { return sessionId; } + void set_sessionId(const sessionId_t &sessionId) { this->sessionId = sessionId; } - decltype(sessionId) c_get_val_sessionId() const { return sessionId; } + sessionId_t c_get_val_sessionId() const { return sessionId; } static bool initMessage() { return false; }; static bool init() { return false; } diff --git a/clkmgr/common/transport.cpp b/clkmgr/common/transport.cpp index 3953294a..f0d0e945 100644 --- a/clkmgr/common/transport.cpp +++ b/clkmgr/common/transport.cpp @@ -97,7 +97,7 @@ bool Transport::init() bool Transport::stop() { /* Send stop signal to all of the threads */ - for(decltype(workerList)::iterator it = workerList.begin(); + for(std::vector::iterator it = workerList.begin(); it != workerList.end(); ++it) it->exitVal->store(true); /* Do any transport specific stop */ diff --git a/clkmgr/common/transport.hpp b/clkmgr/common/transport.hpp index 2ac250bb..08a60766 100644 --- a/clkmgr/common/transport.hpp +++ b/clkmgr/common/transport.hpp @@ -41,15 +41,15 @@ class TransportContext TransportContext() : _init(true), offset(0) {} virtual ~TransportContext() = default; - const decltype(offset) &getc_offset() { return offset; } - decltype(offset) &get_offset() { return offset; } - void set_offset(const decltype(offset) &offset) { this->offset = offset; } - decltype(offset) c_get_val_offset() const { return offset; } + const std::size_t &getc_offset() { return offset; } + std::size_t &get_offset() { return offset; } + void set_offset(const std::size_t &offset) { this->offset = offset; } + std::size_t c_get_val_offset() const { return offset; } - const decltype(buffer) &getc_buffer() { return buffer; } - decltype(buffer) &get_buffer() { return buffer; } - void set_buffer(const decltype(buffer) &buffer) { this->buffer = buffer; } - decltype(buffer) c_get_val_buffer() const { return buffer; } + const TransportBuffer &getc_buffer() { return buffer; } + TransportBuffer &get_buffer() { return buffer; } + void set_buffer(const TransportBuffer &buffer) { this->buffer = buffer; } + TransportBuffer c_get_val_buffer() const { return buffer; } void resetOffset() { set_offset(0); } void addOffset(std::size_t offset) { this->offset += offset; } @@ -101,7 +101,7 @@ class Transport static std::vector workerList; static void dispatchLoop( std::promise, - decltype(TransportWorkerState::exitVal) exitVal, + std::shared_ptr> exitVal, TransportWork arg ); public: