diff options
author | Yang Gao <yangg@google.com> | 2015-06-17 16:31:39 -0700 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-06-17 16:31:39 -0700 |
commit | fd7627691f13b1c62e97014253b3ac011e5e4b94 (patch) | |
tree | 1ac69a1bc4809c4ba1fe05eadc702612f2205dd5 | |
parent | 29a6919f85b768b14172944b95e7af1d1f3cc7cf (diff) |
Move to new Status API
-rw-r--r-- | cpp/helloworld/greeter_async_client.cc | 2 | ||||
-rw-r--r-- | cpp/helloworld/greeter_client.cc | 2 | ||||
-rw-r--r-- | cpp/route_guide/route_guide_client.cc | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/cpp/helloworld/greeter_async_client.cc b/cpp/helloworld/greeter_async_client.cc index b88ba0e74a..561b880ecb 100644 --- a/cpp/helloworld/greeter_async_client.cc +++ b/cpp/helloworld/greeter_async_client.cc @@ -79,7 +79,7 @@ class GreeterClient { GPR_ASSERT(ok); GPR_ASSERT(got_tag == (void*)1); - if (status.IsOk()) { + if (status.ok()) { return reply.message(); } else { return "Rpc failed"; diff --git a/cpp/helloworld/greeter_client.cc b/cpp/helloworld/greeter_client.cc index c0aec1696a..44e4447f1f 100644 --- a/cpp/helloworld/greeter_client.cc +++ b/cpp/helloworld/greeter_client.cc @@ -64,7 +64,7 @@ class GreeterClient { ClientContext context; Status status = stub_->SayHello(&context, request, &reply); - if (status.IsOk()) { + if (status.ok()) { return reply.message(); } else { return "Rpc failed"; diff --git a/cpp/route_guide/route_guide_client.cc b/cpp/route_guide/route_guide_client.cc index 91e1cebfc7..734ea9fb8a 100644 --- a/cpp/route_guide/route_guide_client.cc +++ b/cpp/route_guide/route_guide_client.cc @@ -124,7 +124,7 @@ class RouteGuideClient { << feature.location().longitude()/kCoordFactor_ << std::endl; } Status status = reader->Finish(); - if (status.IsOk()) { + if (status.ok()) { std::cout << "ListFeatures rpc succeeded." << std::endl; } else { std::cout << "ListFeatures rpc failed." << std::endl; @@ -160,7 +160,7 @@ class RouteGuideClient { } writer->WritesDone(); Status status = writer->Finish(); - if (status.IsOk()) { + if (status.ok()) { std::cout << "Finished trip with " << stats.point_count() << " points\n" << "Passed " << stats.feature_count() << " features\n" << "Travelled " << stats.distance() << " meters\n" @@ -200,7 +200,7 @@ class RouteGuideClient { } writer.join(); Status status = stream->Finish(); - if (!status.IsOk()) { + if (!status.ok()) { std::cout << "RouteChat rpc failed." << std::endl; } } @@ -210,7 +210,7 @@ class RouteGuideClient { bool GetOneFeature(const Point& point, Feature* feature) { ClientContext context; Status status = stub_->GetFeature(&context, point, feature); - if (!status.IsOk()) { + if (!status.ok()) { std::cout << "GetFeature rpc failed." << std::endl; return false; } |