Skip to content

Commit

Permalink
fix compiler error
Browse files Browse the repository at this point in the history
  • Loading branch information
JMHOO committed Nov 20, 2016
1 parent f4b03f5 commit feb5d9c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Binary file not shown.
6 changes: 3 additions & 3 deletions ServerCPP/src/jsonkvPackage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jsonkvPacket::jsonkvPacket(const char* pData, unsigned int nDataLen, int clientS
catch(...)
{ }
}
jsonkvPacket(std::string pData)
jsonkvPacket::jsonkvPacket(std::string pData)
{
try
{
m_json_request = json::parse(pData);
m_json_request = json::parse(pData.c_str());
}
catch(std::invalid_argument arg)
{
Expand Down Expand Up @@ -170,4 +170,4 @@ bool jsonkvPacket::GetResult(char*& pStreamData, unsigned long& ulDataLen)
memcpy(pStreamData, strResult.c_str(), ulDataLen);

return true;
}
}
7 changes: 3 additions & 4 deletions ServerCPP/src/jsonkvPackage.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

#include "PackageInterface.h"
#include "json.hpp"
#include<iostream>
#include<string>
using namespace std;
#include <string>

class jsonkvPacket : public IPacket
{
public:
Expand All @@ -26,4 +25,4 @@ class jsonkvPacket : public IPacket
nlohmann::json __process_one_operation__(nlohmann::json jrequest);
};

#endif
#endif
1 change: 1 addition & 0 deletions ServerCPP/src/paxosProposal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ namespace Paxos

void Proposal::ProcessMessage(IPacket* p)
{
jsonPaxos* pm = dynamic_cast<jsonPaxos*>(p);

}

Expand Down

0 comments on commit feb5d9c

Please sign in to comment.