rename ptr

This commit is contained in:
dimon4eg 2019-05-09 01:05:47 +03:00
parent 75011d0b4e
commit a69408fa25
2 changed files with 7 additions and 7 deletions

View File

@ -47,7 +47,7 @@ namespace ix
const WebSocketOpenInfo& openInfo,
const WebSocketCloseInfo& closeInfo)
{
MessageDataPtr message(new Message());
MessagePtr message(new Message());
message->type = type;
message->str = str;
@ -69,9 +69,9 @@ namespace ix
_onMessageUserCallback = callback;
}
WebSocketMessageQueue::MessageDataPtr WebSocketMessageQueue::popMessage()
WebSocketMessageQueue::MessagePtr WebSocketMessageQueue::popMessage()
{
MessageDataPtr message;
MessagePtr message;
std::lock_guard<std::mutex> lock(_messagesMutex);
if (!_messages.empty())
@ -88,7 +88,7 @@ namespace ix
if (!_onMessageUserCallback)
return;
MessageDataPtr message;
MessagePtr message;
while (count > 0 && (message = popMessage()))
{

View File

@ -39,14 +39,14 @@ namespace ix
WebSocketCloseInfo closeInfo;
};
using MessageDataPtr = std::shared_ptr<Message>;
using MessagePtr = std::shared_ptr<Message>;
MessageDataPtr popMessage();
MessagePtr popMessage();
private:
WebSocket* _websocket = nullptr;
OnMessageCallback _onMessageUserCallback;
std::mutex _messagesMutex;
std::list<MessageDataPtr> _messages;
std::list<MessagePtr> _messages;
};
}