From 03f9c1ab071d3b5d8077186300d6b17bcd83b2dc Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Wed, 15 Apr 2020 13:42:38 +0200 Subject: [PATCH] removed spaces at end of line --- src/ntid.cpp | 10 +++++----- src/ntmultiChannel.cpp | 6 +++--- src/ntnameValue.cpp | 2 +- src/ntndarray.cpp | 4 ++-- src/ntscalarMultiChannel.cpp | 6 +++--- src/nttable.cpp | 2 +- test/ntaggregateTest.cpp | 2 +- test/ntenumTest.cpp | 2 +- test/ntndarrayTest.cpp | 10 +++++----- test/validatorTest.cpp | 10 +++++----- 10 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/ntid.cpp b/src/ntid.cpp index 9a46a80..3ca497a 100644 --- a/src/ntid.cpp +++ b/src/ntid.cpp @@ -7,11 +7,11 @@ #include #include -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 diff --git a/src/ntmultiChannel.cpp b/src/ntmultiChannel.cpp index c26f641..cb59b74 100644 --- a/src/ntmultiChannel.cpp +++ b/src/ntmultiChannel.cpp @@ -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; } diff --git a/src/ntnameValue.cpp b/src/ntnameValue.cpp index d34d6b9..81b7169 100644 --- a/src/ntnameValue.cpp +++ b/src/ntnameValue.cpp @@ -140,7 +140,7 @@ bool NTNameValue::isCompatible(StructureConstPtr const & structure) return false; Result result(structure); - + return result .is() .has("name") diff --git a/src/ntndarray.cpp b/src/ntndarray.cpp index 42ed58a..8766880 100644 --- a/src/ntndarray.cpp +++ b/src/ntndarray.cpp @@ -71,7 +71,7 @@ StructureConstPtr NTNDArrayBuilder::createStructure() ScalarType st = static_cast(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 { diff --git a/src/ntscalarMultiChannel.cpp b/src/ntscalarMultiChannel.cpp index 69d2be7..475e80f 100644 --- a/src/ntscalarMultiChannel.cpp +++ b/src/ntscalarMultiChannel.cpp @@ -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() diff --git a/src/nttable.cpp b/src/nttable.cpp index 458dd9d..8b76fce 100644 --- a/src/nttable.cpp +++ b/src/nttable.cpp @@ -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; diff --git a/test/ntaggregateTest.cpp b/test/ntaggregateTest.cpp index f88a731..7cee35e 100644 --- a/test/ntaggregateTest.cpp +++ b/test/ntaggregateTest.cpp @@ -78,7 +78,7 @@ void test_ntaggregate() // example how to set a value // ntAggregate->getValue()->put(1.0); - + // // example how to get a value // diff --git a/test/ntenumTest.cpp b/test/ntenumTest.cpp index cc0c2ba..8d48bc8 100644 --- a/test/ntenumTest.cpp +++ b/test/ntenumTest.cpp @@ -84,7 +84,7 @@ void test_ntenum() choices[1] = "On"; pvValue->getSubField("choices")->replace(freeze(choices)); pvValue->getSubField("index")->put(1); - + // // example how to get a value // diff --git a/test/ntndarrayTest.cpp b/test/ntndarrayTest.cpp index bbd05cb..bbdd53d 100644 --- a/test/ntndarrayTest.cpp +++ b/test/ntndarrayTest.cpp @@ -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(); diff --git a/test/validatorTest.cpp b/test/validatorTest.cpp index ff2ab12..337d3ec 100644 --- a/test/validatorTest.cpp +++ b/test/validatorTest.cpp @@ -90,7 +90,7 @@ void test_is_id() testOk(!result.valid(), "!Result(Union['TEST_ID']).is('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("A") .has("B"); - testOk(!result.valid(), + testOk(!result.valid(), "!Result(%s).has('A').has('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("A") .has("C"); - testOk(!result.valid(), + testOk(!result.valid(), "!Result(%s).has('A').has('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("A") .maybeHas("B"); - testOk(!result.valid(), + testOk(!result.valid(), "!Result(%s).maybeHas('A').maybeHas('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("A") .maybeHas("C"); - testOk(result.valid(), + testOk(result.valid(), "Result(%s).maybeHas('A').maybeHas('C').valid()", strucRepr.c_str()); }