mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Mark constructors with only one parameter as explicit
Spotted by cppcheck
This commit is contained in:
parent
8d080364d2
commit
c6d8592ffb
@ -84,7 +84,8 @@ struct FileName::Private
|
||||
{
|
||||
Private() {}
|
||||
|
||||
Private(string const & abs_filename) : fi(toqstr(handleTildeName(abs_filename)))
|
||||
explicit Private(string const & abs_filename)
|
||||
: fi(toqstr(handleTildeName(abs_filename)))
|
||||
{
|
||||
name = fromqstr(fi.absoluteFilePath());
|
||||
fi.setCaching(fi.exists() ? true : false);
|
||||
|
@ -30,7 +30,7 @@ namespace support {
|
||||
struct TempFile::Private
|
||||
{
|
||||
///
|
||||
Private(QString const & mask) : f(mask)
|
||||
explicit Private(QString const & mask) : f(mask)
|
||||
{
|
||||
LYXERR(Debug::FILES, "Temporary file in " << fromqstr(mask));
|
||||
if (f.open())
|
||||
|
@ -51,7 +51,7 @@ namespace lyx {
|
||||
|
||||
struct IconvProcessor::Handler {
|
||||
// assumes cd is valid
|
||||
Handler(iconv_t const cd) : cd(cd) {}
|
||||
explicit Handler(iconv_t const cd) : cd(cd) {}
|
||||
~Handler() {
|
||||
if (iconv_close(cd) == -1)
|
||||
LYXERR0("Error returned from iconv_close(" << errno << ')');
|
||||
|
Loading…
Reference in New Issue
Block a user