Cleanup: Clang-Tidy, modernize-use-override

No functional changes.
This commit is contained in:
Sybren A. Stüvel 2020-12-04 12:02:52 +01:00
parent 1166110a9d
commit 168909d974
7 changed files with 28 additions and 28 deletions

View File

@ -325,7 +325,7 @@ class ConstantReadAttribute final : public ReadAttribute {
type.copy_to_uninitialized(value, value_);
}
~ConstantReadAttribute()
~ConstantReadAttribute() override
{
this->cpp_type_.destruct(value_);
MEM_freeN(value_);

View File

@ -36,7 +36,7 @@ class AllObjectsNodeBuilder : public DepsgraphNodeBuilder {
{
}
virtual bool need_pull_base_into_graph(Base * /*base*/) override
bool need_pull_base_into_graph(Base * /*base*/) override
{
return true;
}
@ -49,7 +49,7 @@ class AllObjectsRelationBuilder : public DepsgraphRelationBuilder {
{
}
virtual bool need_pull_base_into_graph(Base * /*base*/) override
bool need_pull_base_into_graph(Base * /*base*/) override
{
return true;
}

View File

@ -55,7 +55,7 @@ class DepsgraphFromIDsNodeBuilder : public DepsgraphNodeBuilder {
{
}
virtual bool need_pull_base_into_graph(Base *base) override
bool need_pull_base_into_graph(Base *base) override
{
if (!filter_.contains(&base->object->id)) {
return false;
@ -63,7 +63,7 @@ class DepsgraphFromIDsNodeBuilder : public DepsgraphNodeBuilder {
return DepsgraphNodeBuilder::need_pull_base_into_graph(base);
}
virtual void build_object_proxy_group(Object *object, bool is_visible) override
void build_object_proxy_group(Object *object, bool is_visible) override
{
if (object->proxy_group == nullptr) {
return;
@ -88,7 +88,7 @@ class DepsgraphFromIDsRelationBuilder : public DepsgraphRelationBuilder {
{
}
virtual bool need_pull_base_into_graph(Base *base) override
bool need_pull_base_into_graph(Base *base) override
{
if (!filter_.contains(&base->object->id)) {
return false;
@ -96,7 +96,7 @@ class DepsgraphFromIDsRelationBuilder : public DepsgraphRelationBuilder {
return DepsgraphRelationBuilder::need_pull_base_into_graph(base);
}
virtual void build_object_proxy_group(Object *object) override
void build_object_proxy_group(Object *object) override
{
if (object->proxy_group == nullptr) {
return;

View File

@ -2326,7 +2326,7 @@ struct silhouette_binary_rule : public binary_rule<segment, segment> {
{
}
virtual bool operator()(segment &s1, segment &s2)
bool operator()(segment &s1, segment &s2) override
{
FEdge *f1 = s1.edge();
FEdge *f2 = s2.edge();

View File

@ -120,11 +120,11 @@ class IMemStream : public Imf::IStream {
_exrbuf = exrbuf;
}
virtual ~IMemStream()
~IMemStream() override
{
}
virtual bool read(char c[], int n)
bool read(char c[], int n) override
{
if (n + _exrpos <= _exrsize) {
memcpy(c, (void *)(&_exrbuf[_exrpos]), n);
@ -135,17 +135,17 @@ class IMemStream : public Imf::IStream {
return false;
}
virtual Int64 tellg()
Int64 tellg() override
{
return _exrpos;
}
virtual void seekg(Int64 pos)
void seekg(Int64 pos) override
{
_exrpos = pos;
}
virtual void clear()
void clear() override
{
}
@ -175,7 +175,7 @@ class IFileStream : public Imf::IStream {
}
}
virtual bool read(char c[], int n)
bool read(char c[], int n) override
{
if (!ifs) {
throw Iex::InputExc("Unexpected end of file.");
@ -186,18 +186,18 @@ class IFileStream : public Imf::IStream {
return check_error();
}
virtual Int64 tellg()
Int64 tellg() override
{
return std::streamoff(ifs.tellg());
}
virtual void seekg(Int64 pos)
void seekg(Int64 pos) override
{
ifs.seekg(pos);
check_error();
}
virtual void clear()
void clear() override
{
ifs.clear();
}
@ -227,7 +227,7 @@ class OMemStream : public OStream {
{
}
virtual void write(const char c[], int n)
void write(const char c[], int n) override
{
ensure_size(offset + n);
memcpy(ibuf->encodedbuffer + offset, c, n);
@ -235,12 +235,12 @@ class OMemStream : public OStream {
ibuf->encodedsize += n;
}
virtual Int64 tellp()
Int64 tellp() override
{
return offset;
}
virtual void seekp(Int64 pos)
void seekp(Int64 pos) override
{
offset = pos;
ensure_size(offset);
@ -281,19 +281,19 @@ class OFileStream : public OStream {
}
}
virtual void write(const char c[], int n)
void write(const char c[], int n) override
{
errno = 0;
ofs.write(c, n);
check_error();
}
virtual Int64 tellp()
Int64 tellp() override
{
return std::streamoff(ofs.tellp());
}
virtual void seekp(Int64 pos)
void seekp(Int64 pos) override
{
ofs.seekp(pos);
check_error();

View File

@ -23,7 +23,7 @@ class AlembicExportTest : public testing::Test {
Depsgraph *depsgraph;
Main *bmain;
virtual void SetUp()
void SetUp() override
{
abc_archive = nullptr;
@ -41,7 +41,7 @@ class AlembicExportTest : public testing::Test {
depsgraph = DEG_graph_new(bmain, &scene, view_layer, DAG_EVAL_RENDER);
}
virtual void TearDown()
void TearDown() override
{
BKE_main_free(bmain);
DEG_graph_free(depsgraph);

View File

@ -73,7 +73,7 @@ class TestingHierarchyIterator : public AbstractHierarchyIterator {
explicit TestingHierarchyIterator(Depsgraph *depsgraph) : AbstractHierarchyIterator(depsgraph)
{
}
virtual ~TestingHierarchyIterator()
~TestingHierarchyIterator() override
{
release_writers();
}
@ -106,13 +106,13 @@ class AbstractHierarchyIteratorTest : public BlendfileLoadingBaseTest {
protected:
TestingHierarchyIterator *iterator;
virtual void SetUp()
void SetUp() override
{
BlendfileLoadingBaseTest::SetUp();
iterator = nullptr;
}
virtual void TearDown()
void TearDown() override
{
iterator_free();
BlendfileLoadingBaseTest::TearDown();