提交 5872a659 编写于 作者: W wangguibao

Fix code

上级 3f6cdd15
...@@ -18,7 +18,12 @@ ...@@ -18,7 +18,12 @@
#include <string> #include <string>
#include <vector> #include <vector>
#ifdef BCLOUD
#include "baidu/rpc/server.h"
#else
#include "brpc/server.h" #include "brpc/server.h"
#endif
#include "cube/cube-api/cube.pb.h" #include "cube/cube-api/cube.pb.h"
#include "cube/cube-api/include/meta.h" #include "cube/cube-api/include/meta.h"
......
...@@ -19,11 +19,25 @@ ...@@ -19,11 +19,25 @@
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#ifdef BCLOUD
#include "baidu/rpc/channel.h"
#include "baidu/rpc/parallel_channel.h"
#include "rapidjson/document.h"
#else
#include "brpc/channel.h" #include "brpc/channel.h"
#include "brpc/parallel_channel.h" #include "brpc/parallel_channel.h"
#include "butil/third_party/rapidjson/document.h" #include "butil/third_party/rapidjson/document.h"
#endif
#include "bvar/bvar.h" #include "bvar/bvar.h"
#ifdef BCLOUD
namespace brpc = baidu::rpc;
#ifndef BUTIL_RAPIDJSON_NAMESPACE
#define BUTIL_RAPIDJSON_NAMESPACE RAPIDJSON_NAMESPACE
#endif
#endif
namespace rec { namespace rec {
namespace mcube { namespace mcube {
......
...@@ -13,8 +13,14 @@ ...@@ -13,8 +13,14 @@
// limitations under the License. // limitations under the License.
#include "cube/cube-api/include/cube_api.h" #include "cube/cube-api/include/cube_api.h"
#ifdef BCLOUD
#include <baidu/rpc/channel.h>
#include <baidu/rpc/parallel_channel.h>
#else
#include <brpc/channel.h> #include <brpc/channel.h>
#include <brpc/parallel_channel.h> #include <brpc/parallel_channel.h>
#endif
#include <google/protobuf/descriptor.h> #include <google/protobuf/descriptor.h>
#include "cube/cube-api/include/cube_api_bvar.h" #include "cube/cube-api/include/cube_api_bvar.h"
...@@ -25,6 +31,10 @@ namespace { ...@@ -25,6 +31,10 @@ namespace {
static ::rec::mcube::CubeAPI* g_ins = NULL; static ::rec::mcube::CubeAPI* g_ins = NULL;
} }
#ifdef BCLOUD
namespace brpc = baidu::rpc;
#endif
namespace rec { namespace rec {
namespace mcube { namespace mcube {
......
...@@ -26,6 +26,10 @@ namespace { ...@@ -26,6 +26,10 @@ namespace {
static ::rec::mcube::Meta* g_ins = NULL; static ::rec::mcube::Meta* g_ins = NULL;
} }
#ifdef BCLOUD
namespace brpc = baidu::rpc;
#endif
namespace rec { namespace rec {
namespace mcube { namespace mcube {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册