summaryrefslogtreecommitdiff
path: root/core/templates
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-04-05 13:40:26 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-04-06 14:34:37 +0300
commitf851c4aa330e1064a66db50be62db2466f4fb768 (patch)
tree70f3bd487e91feb4ca777dba214a09b17041da97 /core/templates
parent72407a9cfbd4f58102972c0910429f3ab7006f07 (diff)
Fix some issues found by cppcheck.
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/command_queue_mt.h8
-rw-r--r--core/templates/thread_work_pool.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/core/templates/command_queue_mt.h b/core/templates/command_queue_mt.h
index 0aa1cfd541..7d3e31b5bc 100644
--- a/core/templates/command_queue_mt.h
+++ b/core/templates/command_queue_mt.h
@@ -215,7 +215,7 @@
T *instance; \
M method; \
SEMIC_SEP_LIST(PARAM_DECL, N); \
- virtual void call() { \
+ virtual void call() override { \
(instance->*method)(COMMA_SEP_LIST(ARG, N)); \
} \
};
@@ -227,7 +227,7 @@
T *instance; \
M method; \
SEMIC_SEP_LIST(PARAM_DECL, N); \
- virtual void call() { \
+ virtual void call() override { \
*ret = (instance->*method)(COMMA_SEP_LIST(ARG, N)); \
} \
};
@@ -238,7 +238,7 @@
T *instance; \
M method; \
SEMIC_SEP_LIST(PARAM_DECL, N); \
- virtual void call() { \
+ virtual void call() override { \
(instance->*method)(COMMA_SEP_LIST(ARG, N)); \
} \
};
@@ -313,7 +313,7 @@ class CommandQueueMT {
struct SyncCommand : public CommandBase {
SyncSemaphore *sync_sem = nullptr;
- virtual void post() {
+ virtual void post() override {
sync_sem->sem.post();
}
};
diff --git a/core/templates/thread_work_pool.h b/core/templates/thread_work_pool.h
index d364ac4fd8..b0cebf04f1 100644
--- a/core/templates/thread_work_pool.h
+++ b/core/templates/thread_work_pool.h
@@ -52,7 +52,7 @@ class ThreadWorkPool {
C *instance;
M method;
U userdata;
- virtual void work() {
+ virtual void work() override {
while (true) {
uint32_t work_index = index->fetch_add(1, std::memory_order_relaxed);
if (work_index >= max_elements) {