Skip to content
Snippets Groups Projects
Commit 799079f4 authored by Tomasz Kozak's avatar Tomasz Kozak
Browse files

Improve variable naming in ExceptionHandlingDecorator.

parent 71180027
No related branches found
No related tags found
No related merge requests found
...@@ -49,8 +49,8 @@ namespace ChimeraTK { ...@@ -49,8 +49,8 @@ namespace ChimeraTK {
protected: protected:
DeviceModule& deviceModule; DeviceModule& deviceModule;
DataValidity validity{DataValidity::ok}; DataValidity localValidity{DataValidity::ok};
bool genericTransfer(std::function<bool(void)> callable, bool invalidateOnFailure = true); bool genericTransfer(std::function<bool(void)> callable, bool updateOwnerValidityFlag = true);
void setOwnerValidity(DataValidity newValidity); void setOwnerValidity(DataValidity newValidity);
EntityOwner* _owner = {nullptr}; EntityOwner* _owner = {nullptr};
}; };
......
...@@ -9,8 +9,8 @@ namespace ChimeraTK { ...@@ -9,8 +9,8 @@ namespace ChimeraTK {
template<typename UserType> template<typename UserType>
void ExceptionHandlingDecorator<UserType>::setOwnerValidity(DataValidity newValidity) { void ExceptionHandlingDecorator<UserType>::setOwnerValidity(DataValidity newValidity) {
if (newValidity != validity) { if (newValidity != localValidity) {
validity = newValidity; localValidity = newValidity;
if (!_owner) return; if (!_owner) return;
if (newValidity == DataValidity::faulty) { if (newValidity == DataValidity::faulty) {
_owner->incrementDataFaultCounter(); _owner->incrementDataFaultCounter();
...@@ -78,8 +78,7 @@ namespace ChimeraTK { ...@@ -78,8 +78,7 @@ namespace ChimeraTK {
template<typename UserType> template<typename UserType>
bool ExceptionHandlingDecorator<UserType>::doReadTransferNonBlocking() { bool ExceptionHandlingDecorator<UserType>::doReadTransferNonBlocking() {
return genericTransfer( return genericTransfer( [this]() { return ChimeraTK::NDRegisterAccessorDecorator<UserType>::doReadTransferNonBlocking(); });
[this]() { return ChimeraTK::NDRegisterAccessorDecorator<UserType>::doReadTransferNonBlocking(); });
} }
template<typename UserType> template<typename UserType>
...@@ -127,7 +126,7 @@ namespace ChimeraTK { ...@@ -127,7 +126,7 @@ namespace ChimeraTK {
return delegatedValidity; return delegatedValidity;
} }
return validity; return localValidity;
} }
template<typename UserType> template<typename UserType>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment