[Bf-blender-cvs] [3e3e42cbcb8] master: Cycles: Cleanup, mark overridden virtual methods as such
Sergey Sharybin
noreply at git.blender.org
Fri Sep 4 12:37:48 CEST 2020
Commit: 3e3e42cbcb899c879936ec596759a9c7e533dd5f
Author: Sergey Sharybin
Date: Fri Sep 4 12:36:51 2020 +0200
Branches: master
https://developer.blender.org/rB3e3e42cbcb899c879936ec596759a9c7e533dd5f
Cycles: Cleanup, mark overridden virtual methods as such
Solves strict Clang warnings reported on Linux.
===================================================================
M intern/cycles/device/device_cpu.cpp
===================================================================
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index d37ed046c1e..23aedcd0c48 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -356,12 +356,12 @@ class CPUDevice : public Device {
texture_info.free();
}
- virtual bool show_samples() const
+ virtual bool show_samples() const override
{
return (info.cpu_threads == 1);
}
- virtual BVHLayoutMask get_bvh_layout_mask() const
+ virtual BVHLayoutMask get_bvh_layout_mask() const override
{
BVHLayoutMask bvh_layout_mask = BVH_LAYOUT_BVH2;
#ifdef WITH_EMBREE
@@ -378,7 +378,7 @@ class CPUDevice : public Device {
}
}
- void mem_alloc(device_memory &mem)
+ virtual void mem_alloc(device_memory &mem) override
{
if (mem.type == MEM_TEXTURE) {
assert(!"mem_alloc not supported for textures.");
@@ -408,7 +408,7 @@ class CPUDevice : public Device {
}
}
- void mem_copy_to(device_memory &mem)
+ virtual void mem_copy_to(device_memory &mem) override
{
if (mem.type == MEM_GLOBAL) {
global_free(mem);
@@ -430,12 +430,13 @@ class CPUDevice : public Device {
}
}
- void mem_copy_from(device_memory & /*mem*/, int /*y*/, int /*w*/, int /*h*/, int /*elem*/)
+ virtual void mem_copy_from(
+ device_memory & /*mem*/, int /*y*/, int /*w*/, int /*h*/, int /*elem*/) override
{
/* no-op */
}
- void mem_zero(device_memory &mem)
+ virtual void mem_zero(device_memory &mem) override
{
if (!mem.device_pointer) {
mem_alloc(mem);
@@ -446,7 +447,7 @@ class CPUDevice : public Device {
}
}
- void mem_free(device_memory &mem)
+ virtual void mem_free(device_memory &mem) override
{
if (mem.type == MEM_GLOBAL) {
global_free(mem);
@@ -464,12 +465,12 @@ class CPUDevice : public Device {
}
}
- virtual device_ptr mem_alloc_sub_ptr(device_memory &mem, int offset, int /*size*/)
+ virtual device_ptr mem_alloc_sub_ptr(device_memory &mem, int offset, int /*size*/) override
{
return (device_ptr)(((char *)mem.device_pointer) + mem.memory_elements_size(offset));
}
- void const_copy_to(const char *name, void *host, size_t size)
+ virtual void const_copy_to(const char *name, void *host, size_t size) override
{
kernel_const_copy(&kernel_globals, name, host, size);
}
@@ -527,7 +528,7 @@ class CPUDevice : public Device {
}
}
- void *osl_memory()
+ virtual void *osl_memory() override
{
#ifdef WITH_OSL
return &osl_globals;
@@ -1396,7 +1397,7 @@ class CPUDevice : public Device {
delete kg;
}
- int get_split_task_count(DeviceTask &task)
+ virtual int get_split_task_count(DeviceTask &task) override
{
if (task.type == DeviceTask::SHADER)
return task.get_subtask_count(info.cpu_threads, 256);
@@ -1404,7 +1405,7 @@ class CPUDevice : public Device {
return task.get_subtask_count(info.cpu_threads);
}
- void task_add(DeviceTask &task)
+ virtual void task_add(DeviceTask &task) override
{
/* Load texture info. */
load_texture_info();
@@ -1432,12 +1433,12 @@ class CPUDevice : public Device {
}
}
- void task_wait()
+ virtual void task_wait() override
{
task_pool.wait_work();
}
- void task_cancel()
+ virtual void task_cancel() override
{
task_pool.cancel();
}
@@ -1481,7 +1482,7 @@ class CPUDevice : public Device {
#endif
}
- virtual bool load_kernels(const DeviceRequestedFeatures &requested_features_)
+ virtual bool load_kernels(const DeviceRequestedFeatures &requested_features_) override
{
requested_features = requested_features_;
More information about the Bf-blender-cvs
mailing list