clang-tidy fixes for recent stuff

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2023-02-09 13:14:39 -08:00
parent f21b2a2170
commit dee0598edf
No known key found for this signature in database
GPG Key ID: 36D31CFA845F0E3B
2 changed files with 8 additions and 9 deletions

View File

@ -44,7 +44,7 @@ class EXIV2API RiffVideo : public Image {
protected:
class HeaderReader {
std::string id_ = "";
std::string id_;
uint64_t size_ = 0;
public:
@ -54,7 +54,7 @@ class EXIV2API RiffVideo : public Image {
return size_;
}
[[nodiscard]] std::string& getId() {
[[nodiscard]] const std::string& getId() const {
return id_;
}
};
@ -66,7 +66,7 @@ class EXIV2API RiffVideo : public Image {
void decodeBlocks();
private:
bool equal(const std::string& str1, const std::string& str2);
static bool equal(const std::string& str1, const std::string& str2);
/*!
@brief Interpret MainAVIHeader (avih) structure, and save it in the respective XMP container.
@ -130,7 +130,7 @@ class EXIV2API RiffVideo : public Image {
*/
void readJunk(uint64_t size_);
std::string getStreamType(uint32_t stream);
static std::string getStreamType(uint32_t stream);
/*!
@brief Calculates Duration of a video, and stores it in the respective XMP container.
@param frame_rate Frame rate of the video.

View File

@ -740,14 +740,13 @@ void RiffVideo::readJunk(uint64_t size_) {
std::string RiffVideo::getStreamType(uint32_t stream) {
if (stream == 1)
return "Mono";
else if (stream == 2)
if (stream == 2)
return "Stereo";
else if (stream == 5)
if (stream == 5)
return "5.1 Surround Sound";
else if (stream == 7)
if (stream == 7)
return "7.1 Surround Sound";
else
return "Mono";
return "Mono";
}
void RiffVideo::fillDuration(double frame_rate, size_t frame_count) {