~widelands-dev/widelands/trunk

« back to all changes in this revision

Viewing changes to src/logic/map_objects/findnode.cc

  • Committer: The Widelands Bunnybot
  • Date: 2022-02-27 18:58:23 UTC
  • Revision ID: bunnybot@widelands.org-20220227185823-tyvkc7z2dho9it5a
Fix misc clang-tidy checks in `logic` (#5255)

(by Noordfrees)
f48cadd044004aa7eb32d222927ec9b0ab744457

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
}
34
34
 
35
35
void FindNodeAnd::add(const FindNode& findfield, bool const negate) {
36
 
        subfunctors.push_back(Subfunctor(findfield, negate));
 
36
        subfunctors.emplace_back(findfield, negate);
37
37
}
38
38
 
39
39
bool FindNodeAnd::accept(const EditorGameBase& egbase, const FCoords& coord) const {
45
45
        return true;
46
46
}
47
47
 
48
 
bool FindNodeCaps::accept(const EditorGameBase&, const FCoords& coord) const {
 
48
bool FindNodeCaps::accept(const EditorGameBase& /* egbase */, const FCoords& coord) const {
49
49
        NodeCaps nodecaps = coord.field->nodecaps();
50
50
 
51
51
        if ((nodecaps & BUILDCAPS_SIZEMASK) < (mincaps & BUILDCAPS_SIZEMASK)) {
120
120
              .empty());
121
121
}
122
122
 
123
 
bool FindNodeImmovableSize::accept(const EditorGameBase&, const FCoords& coord) const {
 
123
bool FindNodeImmovableSize::accept(const EditorGameBase& /* egbase */, const FCoords& coord) const {
124
124
        int32_t size = BaseImmovable::NONE;
125
125
 
126
126
        if (BaseImmovable* const imm = coord.field->get_immovable()) {
141
141
        }
142
142
}
143
143
 
144
 
bool FindNodeImmovableAttribute::accept(const EditorGameBase&, const FCoords& coord) const {
 
144
bool FindNodeImmovableAttribute::accept(const EditorGameBase& /* egbase */,
 
145
                                        const FCoords& coord) const {
145
146
        if (BaseImmovable* const imm = coord.field->get_immovable()) {
146
147
                return imm->has_attribute(attribute);
147
148
        }
148
149
        return false;
149
150
}
150
151
 
151
 
bool FindNodeResource::accept(const EditorGameBase&, const FCoords& coord) const {
 
152
bool FindNodeResource::accept(const EditorGameBase& /* egbase */, const FCoords& coord) const {
152
153
        return resource == coord.field->get_resources() && coord.field->get_resources_amount();
153
154
}
154
155