clang-tidy: make several member functions const
Found with readability-make-member-function-const Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Luis Díaz Más
parent
b789c3414f
commit
4aa5566cf6
+2
-2
@@ -82,7 +82,7 @@ namespace {
|
||||
//! Read the timestamp from a broken-down time in buffer \em tm.
|
||||
int read(struct tm* tm);
|
||||
//! Set the timestamp of a file
|
||||
int touch(const std::string& path);
|
||||
int touch(const std::string& path) const;
|
||||
|
||||
private:
|
||||
time_t actime_{0};
|
||||
@@ -1790,7 +1790,7 @@ namespace {
|
||||
return rc;
|
||||
}
|
||||
|
||||
int Timestamp::touch(const std::string& path)
|
||||
int Timestamp::touch(const std::string& path) const
|
||||
{
|
||||
if (0 == actime_) return 1;
|
||||
struct utimbuf buf;
|
||||
|
||||
+1
-1
@@ -233,7 +233,7 @@ INIReader::INIReader(const std::string &filename)
|
||||
_error = ini_parse(filename.c_str(), ValueHandler, this);
|
||||
}
|
||||
|
||||
int INIReader::ParseError()
|
||||
int INIReader::ParseError() const
|
||||
{
|
||||
return _error;
|
||||
}
|
||||
|
||||
+2
-2
@@ -263,7 +263,7 @@ namespace Exiv2 {
|
||||
return b;
|
||||
} // PgfImage::readPgfMagicNumber
|
||||
|
||||
uint32_t PgfImage::readPgfHeaderSize(BasicIo& iIo)
|
||||
uint32_t PgfImage::readPgfHeaderSize(BasicIo& iIo) const
|
||||
{
|
||||
DataBuf buffer(4);
|
||||
long bufRead = iIo.read(buffer.pData_, buffer.size_);
|
||||
@@ -280,7 +280,7 @@ namespace Exiv2 {
|
||||
return headerSize;
|
||||
} // PgfImage::readPgfHeaderSize
|
||||
|
||||
DataBuf PgfImage::readPgfHeaderStructure(BasicIo& iIo, int& width, int& height)
|
||||
DataBuf PgfImage::readPgfHeaderStructure(BasicIo& iIo, int& width, int& height) const
|
||||
{
|
||||
DataBuf header(16);
|
||||
long bufRead = iIo.read(header.pData_, header.size_);
|
||||
|
||||
Reference in New Issue
Block a user