all cstdout uses wrapped in preprocessor defines
This commit is contained in:
@ -46,7 +46,9 @@ const uint8_t* ConstStorageAccessor::data() const {
|
||||
|
||||
size_t ConstStorageAccessor::size() const {
|
||||
if(internalState == AccessState::UNINIT) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::warning << "StorageAccessor: Not initialized!" << std::endl;
|
||||
#endif
|
||||
}
|
||||
return size_;
|
||||
}
|
||||
@ -54,12 +56,16 @@ size_t ConstStorageAccessor::size() const {
|
||||
ReturnValue_t ConstStorageAccessor::getDataCopy(uint8_t *pointer,
|
||||
size_t maxSize) {
|
||||
if(internalState == AccessState::UNINIT) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::warning << "StorageAccessor: Not initialized!" << std::endl;
|
||||
#endif
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
if(size_ > maxSize) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "StorageAccessor: Supplied buffer not large enough"
|
||||
<< std::endl;
|
||||
#endif
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
std::copy(constDataPointer, constDataPointer + size_, pointer);
|
||||
@ -76,7 +82,9 @@ store_address_t ConstStorageAccessor::getId() const {
|
||||
|
||||
void ConstStorageAccessor::print() const {
|
||||
if(internalState == AccessState::UNINIT or constDataPointer == nullptr) {
|
||||
#if CPP_OSTREAM_ENABLED == 1
|
||||
sif::warning << "StorageAccessor: Not initialized!" << std::endl;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
arrayprinter::print(constDataPointer, size_);
|
||||
|
Reference in New Issue
Block a user