removed spaces at end of line

This commit is contained in:
2020-04-15 13:42:38 +02:00
committed by mdavidsaver
parent 6d41566b40
commit 03f9c1ab07
10 changed files with 27 additions and 27 deletions

View File

@ -7,11 +7,11 @@
#include <pv/ntid.h>
#include <pv/typeCast.h>
namespace epics {
namespace epics {
namespace nt {
const static std::string BAD_NAME = "?";
const static std::string BAD_NAME = "?";
NTID::NTID(const std::string & id)
: fullName(id),
@ -81,7 +81,7 @@ namespace nt {
else
{
name = fullName;
}
}
}
return name;
}
@ -105,7 +105,7 @@ namespace nt {
{
endMajorIndex = fullName.find('.', versionSepIndex+1);
majorVersionStr = (endMajorIndex != std::string::npos)
? fullName.substr(versionSepIndex+1, endMajorIndex-(versionSepIndex+1)) :
? fullName.substr(versionSepIndex+1, endMajorIndex-(versionSepIndex+1)) :
fullName.substr(versionSepIndex+1);
}
else
@ -150,7 +150,7 @@ namespace nt {
{
endMinorIndex = fullName.find('.', endMajorIndex+1);
minorVersionStr = (endMinorIndex != std::string::npos)
? fullName.substr(endMajorIndex+1, endMinorIndex-(endMajorIndex+1)) :
? fullName.substr(endMajorIndex+1, endMinorIndex-(endMajorIndex+1)) :
fullName.substr(endMajorIndex+1);
}
else

View File

@ -15,7 +15,7 @@
using namespace std;
using namespace epics::pvData;
namespace epics { namespace nt {
namespace epics { namespace nt {
static FieldCreatePtr fieldCreate = getFieldCreate();
@ -269,7 +269,7 @@ bool NTMultiChannel::isValid()
if (getChannelName()->getLength() != valueLength) return false;
PVScalarArrayPtr arrayFields[] = {
getSeverity(), getStatus(), getMessage(),
getSeverity(), getStatus(), getMessage(),
getSecondsPastEpoch(), getNanoseconds(), getUserTag()
};
size_t N = sizeof(arrayFields)/sizeof(arrayFields[0]);
@ -281,7 +281,7 @@ bool NTMultiChannel::isValid()
if (arrayField.get() && arrayField->getLength() != valueLength)
return false;
}
return true;
return true;
}

View File

@ -140,7 +140,7 @@ bool NTNameValue::isCompatible(StructureConstPtr const & structure)
return false;
Result result(structure);
return result
.is<Structure>()
.has<ScalarArray>("name")

View File

@ -71,7 +71,7 @@ StructureConstPtr NTNDArrayBuilder::createStructure()
ScalarType st = static_cast<ScalarType>(i);
fb->addArray(std::string(ScalarTypeFunc::name(st)) + "Value", st);
}
valueType = fb->createUnion();
valueType = fb->createUnion();
}
if (!codecStruc)
@ -127,7 +127,7 @@ StructureConstPtr NTNDArrayBuilder::createStructure()
returnedStruc = fb->createStructure();
if (!isExtended)
ntndarrayStruc[index] = returnedStruc;
ntndarrayStruc[index] = returnedStruc;
}
else
{

View File

@ -13,7 +13,7 @@
using namespace std;
using namespace epics::pvData;
namespace epics { namespace nt {
namespace epics { namespace nt {
static FieldCreatePtr fieldCreate = getFieldCreate();
@ -263,7 +263,7 @@ bool NTScalarMultiChannel::isValid()
if (getChannelName()->getLength() != valueLength) return false;
PVScalarArrayPtr arrayFields[] = {
getSeverity(), getStatus(), getMessage(),
getSeverity(), getStatus(), getMessage(),
getSecondsPastEpoch(), getNanoseconds(), getUserTag()
};
size_t N = sizeof(arrayFields)/sizeof(arrayFields[0]);
@ -275,7 +275,7 @@ bool NTScalarMultiChannel::isValid()
if (arrayField.get() && arrayField->getLength() != valueLength)
return false;
}
return true;
return true;
}
NTScalarMultiChannelBuilderPtr NTScalarMultiChannel::createBuilder()

View File

@ -188,7 +188,7 @@ bool NTTable::isCompatible(PVStructurePtr const & pvStructure)
bool NTTable::isValid()
{
PVFieldPtrArray const & columns = pvValue->getPVFields();
if (getLabels()->getLength() != columns.size()) return false;
bool first = true;
int length = 0;

View File

@ -78,7 +78,7 @@ void test_ntaggregate()
// example how to set a value
//
ntAggregate->getValue()->put(1.0);
//
// example how to get a value
//

View File

@ -84,7 +84,7 @@ void test_ntenum()
choices[1] = "On";
pvValue->getSubField<PVStringArray>("choices")->replace(freeze(choices));
pvValue->getSubField<PVInt>("index")->put(1);
//
// example how to get a value
//

View File

@ -21,8 +21,8 @@ void test_builder(bool extraFields)
testOk(builder.get() != 0, "Got builder");
builder->addDescriptor()->
addTimeStamp()->
addAlarm()->
addTimeStamp()->
addAlarm()->
addDisplay();
if (extraFields)
@ -68,9 +68,9 @@ void test_all()
PVStructurePtr pvStructure = builder->
addDescriptor()->
addTimeStamp()->
addAlarm()->
addDisplay()->
addTimeStamp()->
addAlarm()->
addDisplay()->
add("extra1",fieldCreate->createScalar(pvString)) ->
add("extra2",fieldCreate->createScalarArray(pvString)) ->
createPVStructure();

View File

@ -90,7 +90,7 @@ void test_is_id()
testOk(!result.valid(), "!Result(Union['TEST_ID']).is<Structure>('TEST_ID').valid()");
testOk1(result.errors.at(0) == Result::Error("", Result::Error::IncorrectType));
}
{
// Type matches, ID doesn't
Result result(FB->setId("WRONG_ID")->createStructure());
@ -140,7 +140,7 @@ void test_has()
result
.has<Scalar>("A")
.has<ScalarArray>("B");
testOk(!result.valid(),
testOk(!result.valid(),
"!Result(%s).has<Scalar>('A').has<ScalarArray>('B').valid()",
strucRepr.c_str());
testOk1(result.errors.at(0) == Result::Error("B", Result::Error::IncorrectType));
@ -152,7 +152,7 @@ void test_has()
result
.has<Scalar>("A")
.has<Scalar>("C");
testOk(!result.valid(),
testOk(!result.valid(),
"!Result(%s).has<Scalar>('A').has<Scalar>('C').valid()",
strucRepr.c_str());
testOk1(result.errors.at(0) == Result::Error("C", Result::Error::MissingField));
@ -199,7 +199,7 @@ void test_maybe_has()
result
.maybeHas<Scalar>("A")
.maybeHas<ScalarArray>("B");
testOk(!result.valid(),
testOk(!result.valid(),
"!Result(%s).maybeHas<Scalar>('A').maybeHas<ScalarArray>('B').valid()",
strucRepr.c_str());
testOk1(result.errors.at(0) == Result::Error("B", Result::Error::IncorrectType));
@ -211,7 +211,7 @@ void test_maybe_has()
result
.maybeHas<Scalar>("A")
.maybeHas<Scalar>("C");
testOk(result.valid(),
testOk(result.valid(),
"Result(%s).maybeHas<Scalar>('A').maybeHas<Scalar>('C').valid()",
strucRepr.c_str());
}