mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Settings: Mark termination enables as an unaligned ptr
Unfortunately, the termination enables are not always at an aligned boundary, and MSVC needs to taint the ptr type with __unaligned in that case.
This commit is contained in:
@@ -210,7 +210,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
const uint64_t* getTerminationEnables() const override {
|
||||
ICSNEO_UNALIGNED(const uint64_t*) getTerminationEnables() const override {
|
||||
auto cfg = getStructurePointer<neovifire2_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return nullptr;
|
||||
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
const uint64_t* getTerminationEnables() const override {
|
||||
ICSNEO_UNALIGNED(const uint64_t*) getTerminationEnables() const override {
|
||||
auto cfg = getStructurePointer<radgigalog_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return nullptr;
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
const uint64_t* getTerminationEnables() const override {
|
||||
ICSNEO_UNALIGNED(const uint64_t*) getTerminationEnables() const override {
|
||||
auto cfg = getStructurePointer<radgigastar_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return nullptr;
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
const uint64_t* getTerminationEnables() const override {
|
||||
ICSNEO_UNALIGNED(const uint64_t*) getTerminationEnables() const override {
|
||||
auto cfg = getStructurePointer<valuecan4_4_2el_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return nullptr;
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
const uint64_t* getTerminationEnables() const override {
|
||||
ICSNEO_UNALIGNED(const uint64_t*) getTerminationEnables() const override {
|
||||
auto cfg = getStructurePointer<valuecan4_1_2_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return nullptr;
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
const uint64_t* getTerminationEnables() const override {
|
||||
ICSNEO_UNALIGNED(const uint64_t*) getTerminationEnables() const override {
|
||||
auto cfg = getStructurePointer<valuecan4_4_2el_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return nullptr;
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
const uint64_t* getTerminationEnables() const override {
|
||||
ICSNEO_UNALIGNED(const uint64_t*) getTerminationEnables() const override {
|
||||
auto cfg = getStructurePointer<valuecan4_industrial_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return nullptr;
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
const uint64_t* getTerminationEnables() const override {
|
||||
ICSNEO_UNALIGNED(const uint64_t*) getTerminationEnables() const override {
|
||||
// Check the structure pointer even though we're not using it so
|
||||
// all of the other checks that go along with it are performed
|
||||
if(getStructurePointer<vividcan_settings_t>() == nullptr)
|
||||
@@ -122,7 +122,7 @@ protected:
|
||||
return &activeTerminationEnables;
|
||||
}
|
||||
|
||||
uint64_t* getMutableTerminationEnables() override {
|
||||
ICSNEO_UNALIGNED(uint64_t*) getMutableTerminationEnables() override {
|
||||
if(getMutableStructurePointer<vividcan_settings_t>() == nullptr)
|
||||
return nullptr;
|
||||
return &queuedTerminationEnables;
|
||||
|
||||
Reference in New Issue
Block a user