general indent beautification

This commit is contained in:
Matej Sekoranja
2016-03-10 23:36:16 +01:00
parent d139c42d17
commit 5279d247ca
110 changed files with 21778 additions and 21525 deletions

View File

@@ -11,9 +11,9 @@ using namespace epics::pvData;
using namespace epics::pvAccess;
static Structure::const_shared_pointer resultStructure =
getFieldCreate()->createFieldBuilder()->
add("c", pvDouble)->
createStructure();
getFieldCreate()->createFieldBuilder()->
add("c", pvDouble)->
createStructure();
// s1 starts with s2 check
static bool starts_with(const std::string& s1, const std::string& s2) {
@@ -23,15 +23,15 @@ static bool starts_with(const std::string& s1, const std::string& s2) {
class SumServiceImpl :
public RPCServiceAsync
{
void request(PVStructure::shared_pointer const & pvArguments,
RPCResponseCallback::shared_pointer const & callback)
void request(PVStructure::shared_pointer const & pvArguments,
RPCResponseCallback::shared_pointer const & callback)
{
// NTURI support
PVStructure::shared_pointer args(
(starts_with(pvArguments->getStructure()->getID(), "epics:nt/NTURI:1.")) ?
pvArguments->getSubField<PVStructure>("query") :
pvArguments
);
(starts_with(pvArguments->getStructure()->getID(), "epics:nt/NTURI:1.")) ?
pvArguments->getSubField<PVStructure>("query") :
pvArguments
);
// get fields and check their existence
PVScalar::shared_pointer af = args->getSubField<PVScalar>("a");
@@ -39,11 +39,11 @@ class SumServiceImpl :
if (!af || !bf)
{
callback->requestDone(
Status(
Status::STATUSTYPE_ERROR,
"scalar 'a' and 'b' fields are required"
),
PVStructure::shared_pointer());
Status(
Status::STATUSTYPE_ERROR,
"scalar 'a' and 'b' fields are required"
),
PVStructure::shared_pointer());
return;
}
@@ -57,14 +57,14 @@ class SumServiceImpl :
catch (std::exception &e)
{
callback->requestDone(
Status(
Status::STATUSTYPE_ERROR,
std::string("failed to convert arguments to double: ") + e.what()
),
PVStructure::shared_pointer());
Status(
Status::STATUSTYPE_ERROR,
std::string("failed to convert arguments to double: ") + e.what()
),
PVStructure::shared_pointer());
return;
}
// create return structure and set data
PVStructure::shared_pointer result = getPVDataCreate()->createPVStructure(resultStructure);
result->getSubField<PVDouble>("c")->put(a+b);