Clean up Clang++ warnings
Removed unnecessary checks of size_t < 0
This commit is contained in:
@ -1039,14 +1039,6 @@ void ChannelArrayLocal::getArray(size_t offset, size_t count, size_t stride)
|
|||||||
{
|
{
|
||||||
cout << "ChannelArrayLocal::getArray" << endl;
|
cout << "ChannelArrayLocal::getArray" << endl;
|
||||||
}
|
}
|
||||||
if(offset<0) {
|
|
||||||
requester->getArrayDone(illegalOffsetStatus,getPtrSelf(),pvCopy);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(stride<0) {
|
|
||||||
requester->getArrayDone(illegalStrideStatus,getPtrSelf(),pvCopy);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const char *exceptionMessage = NULL;
|
const char *exceptionMessage = NULL;
|
||||||
try {
|
try {
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
@ -1088,18 +1080,6 @@ void ChannelArrayLocal::putArray(
|
|||||||
{
|
{
|
||||||
cout << "ChannelArrayLocal::putArray" << endl;
|
cout << "ChannelArrayLocal::putArray" << endl;
|
||||||
}
|
}
|
||||||
if(offset<0) {
|
|
||||||
requester->putArrayDone(illegalOffsetStatus,getPtrSelf());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(count<0) {
|
|
||||||
requester->putArrayDone(illegalCountStatus,getPtrSelf());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(stride<0) {
|
|
||||||
requester->putArrayDone(illegalStrideStatus,getPtrSelf());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
size_t newLength = offset + count*stride;
|
size_t newLength = offset + count*stride;
|
||||||
if(newLength<pvArray->getLength()) pvArray->setLength(newLength);
|
if(newLength<pvArray->getLength()) pvArray->setLength(newLength);
|
||||||
const char *exceptionMessage = NULL;
|
const char *exceptionMessage = NULL;
|
||||||
@ -1147,9 +1127,7 @@ void ChannelArrayLocal::setLength(size_t length)
|
|||||||
try {
|
try {
|
||||||
{
|
{
|
||||||
epicsGuard <PVRecord> guard(*pvRecord);
|
epicsGuard <PVRecord> guard(*pvRecord);
|
||||||
if(length>=0) {
|
if(pvArray->getLength()!=length) pvArray->setLength(length);
|
||||||
if(pvArray->getLength()!=length) pvArray->setLength(length);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
requester->setLengthDone(Status::Ok,getPtrSelf());
|
requester->setLengthDone(Status::Ok,getPtrSelf());
|
||||||
} catch(std::exception e) {
|
} catch(std::exception e) {
|
||||||
|
Reference in New Issue
Block a user