Skip to content
Permalink
Browse files

SharedPtr/WeakPtr typedefs considered harmful.

  • Loading branch information...
Andersbakken committed Oct 4, 2019
1 parent 86eca61 commit f2633f565fc5e7e6958993ef105225f4e68e43ba
Showing with 6 additions and 6 deletions.
  1. +1 −1 src/RClient.cpp
  2. +2 −2 src/Server.cpp
  3. +1 −1 src/Server.h
  4. +1 −1 src/rct
  5. +1 −1 src/rdm.cpp
@@ -367,7 +367,7 @@ void RClient::exec()
{
RTags::initMessages();
OnDestruction onDestruction([]() { Message::cleanup(); });
EventLoop::SharedPtr loop(new EventLoop);
std::shared_ptr<EventLoop> loop(new EventLoop);
loop->init(EventLoop::MainEventLoop);

const int commandCount = mCommands.size();
@@ -352,15 +352,15 @@ std::shared_ptr<Project> Server::addProject(const Path &path)
void Server::onNewConnection(SocketServer *server)
{
while (true) {
SocketClient::SharedPtr client = server->nextConnection();
std::shared_ptr<SocketClient> client = server->nextConnection();
if (!client) {
break;
}
std::shared_ptr<Connection> conn = Connection::create(client, RClient::NumOptions);
if (mOptions.maxSocketWriteBufferSize) {
client->setMaxWriteBufferSize(mOptions.maxSocketWriteBufferSize);
}
conn->setErrorHandler([](const SocketClient::SharedPtr &, Message::MessageError &&error) {
conn->setErrorHandler([](const std::shared_ptr<SocketClient> &, Message::MessageError &&error) {
if (error.type == Message::Message_VersionError) {
::error("Wrong version marker. You're probably using mismatched versions of rc and rdm");
} else {
@@ -239,7 +239,7 @@ class Server
static Server *sInstance;
Options mOptions;
bool mSuspended;
SocketServer::SharedPtr mUnixServer, mTcpServer;
std::shared_ptr<SocketServer> mUnixServer, mTcpServer;
List<String> mEnvironment;

int mPollTimer, mExitCode;
@@ -824,7 +824,7 @@ int main(int argc, char** argv)
}
#endif

EventLoop::SharedPtr loop(new EventLoop);
std::shared_ptr<EventLoop> loop(new EventLoop);
loop->init(EventLoop::MainEventLoop|EventLoop::EnableSigIntHandler|EventLoop::EnableSigTermHandler);

auto server = std::make_shared<Server>();

0 comments on commit f2633f5

Please sign in to comment.
You can’t perform that action at this time.