~widelands-dev/widelands/trunk

« back to all changes in this revision

Viewing changes to src/logic/map_objects/tribes/requirements.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:
185
185
        return value >= min && value <= max;
186
186
}
187
187
 
188
 
void RequireAttribute::write(FileWrite& fw, EditorGameBase&, MapObjectSaver&) const {
 
188
void RequireAttribute::write(FileWrite& fw,
 
189
                             EditorGameBase& /* egbase */,
 
190
                             MapObjectSaver& /* mos */) const {
189
191
        fw.unsigned_8(static_cast<uint8_t>(at));
190
192
        fw.signed_32(min);
191
193
        fw.signed_32(max);
192
194
}
193
195
 
194
 
static Requirements read_attribute(FileRead& fr, EditorGameBase&, MapObjectLoader&) {
 
196
static Requirements
 
197
read_attribute(FileRead& fr, EditorGameBase& /* egbase */, MapObjectLoader& /* mol */) {
195
198
        // Get the training attribute and check if it is a valid enum member
196
199
        // We use a temp value, because the static_cast to the enum might be undefined.
197
200
        uint8_t temp_at = fr.unsigned_8();