Skip to content

Commit

Permalink
Silence minor clang-tidy warnings
Browse files Browse the repository at this point in the history
./src/KDUtils/bytearray.cpp:207:switching on non-enum value without default case may not cover all cases
./src/KDUtils/bytearray.cpp:256:'data' should be used for accessing the data pointer instead of taking the address of the 0-th element

Change-Id: Ie96b3226d1c3a29c1d8f873a6ff3b11fb0991e6f
Reviewed-on: https://codereview.kdab.com/c/kdab/kdutils/+/136242
Tested-by: Continuous Integration <[email protected]>
Reviewed-by: Mike Krus <[email protected]>
  • Loading branch information
MiKom committed Jan 11, 2024
1 parent af815a2 commit 72364fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/KDUtils/bytearray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ ByteArray ByteArray::toBase64() const
break;

case 0:
default: // silence clang-tidy
break;
}

Expand Down Expand Up @@ -253,7 +254,7 @@ int8_t *getInverseB64Table()
for (uint8_t i = 0; i < 255; ++i)
table[i] = getInverseFromB64(i);
}
return &table[0];
return table.data();
}

} // namespace
Expand Down

0 comments on commit 72364fc

Please sign in to comment.