diff options
author | HampusM <hampus@hampusmat.com> | 2022-03-21 13:00:36 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-03-21 13:00:36 +0100 |
commit | 757a29d0137b974fff6ddcc945d76e69ae120ecb (patch) | |
tree | 1fff46951e30eeae0402e99070e60901bd104eea /src/common/memory.tpp | |
parent | 12e3713e7705e4353d306ae2ec03abfe8fcd5f55 (diff) |
Diffstat (limited to 'src/common/memory.tpp')
-rw-r--r-- | src/common/memory.tpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/common/memory.tpp b/src/common/memory.tpp deleted file mode 100644 index af833bc..0000000 --- a/src/common/memory.tpp +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once - -#include "memory.hpp" - -#include "utils.hpp" - -#include <Arduino.h> -#include <stdlib.h> - -namespace common -{ - -template <typename memType> -memType *malloc_s(unsigned int size) -{ - auto *mem = malloc(size); - - if (mem == nullptr) - { - Serial.println("Error: Memory allocation failed"); - while (true) {} - } - - return static_cast<memType *>(mem); -} - -} // namespace common |