mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Mark constructors with only one parameter as explicit
Spotted by cppcheck
This commit is contained in:
parent
19fb4db71e
commit
decd2c74f1
@ -102,7 +102,7 @@ typedef void const * uid_type;
|
||||
class InsetMath : public Inset {
|
||||
public:
|
||||
///
|
||||
InsetMath(Buffer * buf = 0) : Inset(buf) {}
|
||||
explicit InsetMath(Buffer * buf = 0) : Inset(buf) {}
|
||||
/// identification as math inset
|
||||
InsetMath * asInsetMath() { return this; }
|
||||
/// identification as math inset
|
||||
|
@ -54,7 +54,7 @@ private:
|
||||
class InsetMathFBox : public InsetMathNest {
|
||||
public:
|
||||
///
|
||||
InsetMathFBox(Buffer * buf);
|
||||
explicit InsetMathFBox(Buffer * buf);
|
||||
///
|
||||
mode_type currentMode() const { return TEXT_MODE; }
|
||||
///
|
||||
@ -116,7 +116,7 @@ private:
|
||||
class InsetMathBoxed : public InsetMathNest {
|
||||
public:
|
||||
///
|
||||
InsetMathBoxed(Buffer * buf);
|
||||
explicit InsetMathBoxed(Buffer * buf);
|
||||
///
|
||||
marker_type marker(BufferView const *) const { return NO_MARKER; }
|
||||
///
|
||||
|
@ -22,9 +22,9 @@ namespace lyx {
|
||||
class InsetMathBrace : public InsetMathNest {
|
||||
public:
|
||||
///
|
||||
InsetMathBrace(Buffer * buf);
|
||||
explicit InsetMathBrace(Buffer * buf);
|
||||
///
|
||||
InsetMathBrace(MathData const & ar);
|
||||
explicit InsetMathBrace(MathData const & ar);
|
||||
/// identifies brace insets
|
||||
InsetMathBrace * asBraceInset() { return this; }
|
||||
/// identifies brace insets
|
||||
|
@ -23,11 +23,11 @@ class latexkeys;
|
||||
class InsetMathComment : public InsetMathNest {
|
||||
public:
|
||||
///
|
||||
InsetMathComment(Buffer * buf);
|
||||
explicit InsetMathComment(Buffer * buf);
|
||||
///
|
||||
InsetMathComment(MathData const & ar);
|
||||
explicit InsetMathComment(MathData const & ar);
|
||||
///
|
||||
explicit InsetMathComment(Buffer * buf, docstring const &);
|
||||
InsetMathComment(Buffer * buf, docstring const &);
|
||||
///
|
||||
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
||||
///
|
||||
|
@ -22,7 +22,7 @@ namespace lyx {
|
||||
class InsetMathDiagram : public InsetMathGrid {
|
||||
public:
|
||||
///
|
||||
InsetMathDiagram(Buffer * buf);
|
||||
explicit InsetMathDiagram(Buffer * buf);
|
||||
///
|
||||
void metrics(MetricsInfo &, Dimension &) const;
|
||||
///
|
||||
|
@ -24,7 +24,7 @@ namespace lyx {
|
||||
class InsetMathDiff : public InsetMathNest {
|
||||
public:
|
||||
///
|
||||
InsetMathDiff(Buffer * buf);
|
||||
explicit InsetMathDiff(Buffer * buf);
|
||||
///
|
||||
void addDer(MathData const & der);
|
||||
///
|
||||
|
@ -22,7 +22,7 @@ namespace lyx {
|
||||
/// Inset for ensuring math mode
|
||||
class InsetMathEnsureMath : public InsetMathNest {
|
||||
public:
|
||||
InsetMathEnsureMath(Buffer * buf);
|
||||
explicit InsetMathEnsureMath(Buffer * buf);
|
||||
///
|
||||
mode_type currentMode() const { return MATH_MODE; }
|
||||
///
|
||||
|
@ -96,7 +96,7 @@ public:
|
||||
|
||||
public:
|
||||
/// sets nrows and ncols to 1, vertical alingment to 'c'
|
||||
InsetMathGrid(Buffer * buf);
|
||||
explicit InsetMathGrid(Buffer * buf);
|
||||
/// Note: columns first!
|
||||
InsetMathGrid(Buffer * buf, col_type m, row_type n);
|
||||
///
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
NOTAG
|
||||
};
|
||||
///
|
||||
InsetMathHull(Buffer * buf);
|
||||
explicit InsetMathHull(Buffer * buf);
|
||||
///
|
||||
InsetMathHull(Buffer * buf, HullType type);
|
||||
///
|
||||
|
@ -23,7 +23,7 @@ namespace lyx {
|
||||
class InsetMathLefteqn : public InsetMathNest {
|
||||
public:
|
||||
///
|
||||
InsetMathLefteqn(Buffer * buf);
|
||||
explicit InsetMathLefteqn(Buffer * buf);
|
||||
///
|
||||
docstring name() const;
|
||||
///
|
||||
|
@ -24,7 +24,7 @@ namespace lyx {
|
||||
// A # that failed to parse
|
||||
class InsetMathHash : public InsetMath {
|
||||
public:
|
||||
InsetMathHash(docstring const & str = docstring()) : str_('#' + str) {};
|
||||
explicit InsetMathHash(docstring const & str = docstring()) : str_('#' + str) {};
|
||||
///
|
||||
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
||||
///
|
||||
|
@ -250,7 +250,7 @@ void InsetDisplayLabelBox::draw(PainterInfo & pi, int x, int y) const
|
||||
class InsetMathWrapper : public InsetMath {
|
||||
public:
|
||||
///
|
||||
InsetMathWrapper(MathData const * value) : value_(value) {}
|
||||
explicit InsetMathWrapper(MathData const * value) : value_(value) {}
|
||||
///
|
||||
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
||||
///
|
||||
@ -755,7 +755,7 @@ class OptionalsMacroInstanceFix
|
||||
{
|
||||
public:
|
||||
///
|
||||
OptionalsMacroInstanceFix(int optionals) : optionals_(optionals) {}
|
||||
explicit OptionalsMacroInstanceFix(int optionals) : optionals_(optionals) {}
|
||||
///
|
||||
void operator()(InsetMathMacro * macro)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ class XHTMLStream;
|
||||
class InsetMathMacroTemplate : public InsetMathNest {
|
||||
public:
|
||||
///
|
||||
InsetMathMacroTemplate(Buffer * buf);
|
||||
explicit InsetMathMacroTemplate(Buffer * buf);
|
||||
///
|
||||
InsetMathMacroTemplate(Buffer * buf, docstring const & name, int nargs,
|
||||
int optional, MacroType type,
|
||||
|
@ -22,7 +22,7 @@ namespace lyx {
|
||||
class InsetMathOverset : public InsetMathFracBase {
|
||||
public:
|
||||
///
|
||||
InsetMathOverset(Buffer * buf) : InsetMathFracBase(buf) {}
|
||||
explicit InsetMathOverset(Buffer * buf) : InsetMathFracBase(buf) {}
|
||||
///
|
||||
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
||||
///
|
||||
|
@ -21,7 +21,7 @@ namespace lyx {
|
||||
class InsetMathPar : public InsetMathHull {
|
||||
public:
|
||||
///
|
||||
InsetMathPar(Buffer * buf) : InsetMathHull(buf) {}
|
||||
explicit InsetMathPar(Buffer * buf) : InsetMathHull(buf) {}
|
||||
///
|
||||
InsetMathPar(Buffer * buf, MathData const & ar);
|
||||
///
|
||||
|
@ -23,7 +23,7 @@ class Buffer;
|
||||
class InsetMathRef : public InsetMathCommand {
|
||||
public:
|
||||
///
|
||||
InsetMathRef(Buffer * buf);
|
||||
explicit InsetMathRef(Buffer * buf);
|
||||
///
|
||||
explicit InsetMathRef(Buffer * buf, docstring const & data);
|
||||
///
|
||||
|
@ -23,7 +23,7 @@ namespace lyx {
|
||||
class InsetMathRoot : public InsetMathNest {
|
||||
public:
|
||||
///
|
||||
InsetMathRoot(Buffer * buf);
|
||||
explicit InsetMathRoot(Buffer * buf);
|
||||
///
|
||||
bool idxUpDown(Cursor & cur, bool up) const;
|
||||
///
|
||||
|
@ -25,7 +25,7 @@ namespace lyx {
|
||||
class InsetMathScript : public InsetMathNest {
|
||||
public:
|
||||
/// create inset without scripts
|
||||
InsetMathScript(Buffer * buf);
|
||||
explicit InsetMathScript(Buffer * buf);
|
||||
/// create inset with single script
|
||||
explicit InsetMathScript(Buffer * buf, bool up);
|
||||
/// create inset with single script and given nucleus
|
||||
|
@ -23,7 +23,7 @@ namespace lyx {
|
||||
class InsetMathSqrt : public InsetMathNest {
|
||||
public:
|
||||
///
|
||||
InsetMathSqrt(Buffer * buf);
|
||||
explicit InsetMathSqrt(Buffer * buf);
|
||||
///
|
||||
void draw(PainterInfo &, int x, int y) const;
|
||||
///
|
||||
|
@ -23,7 +23,7 @@ namespace lyx {
|
||||
class InsetMathSubstack : public InsetMathGrid {
|
||||
public:
|
||||
///
|
||||
InsetMathSubstack(Buffer * buf);
|
||||
explicit InsetMathSubstack(Buffer * buf);
|
||||
///
|
||||
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
||||
///
|
||||
|
@ -22,7 +22,7 @@ namespace lyx {
|
||||
class InsetMathUnderset : public InsetMathFracBase {
|
||||
public:
|
||||
///
|
||||
InsetMathUnderset(Buffer * buf) : InsetMathFracBase(buf) {}
|
||||
explicit InsetMathUnderset(Buffer * buf) : InsetMathFracBase(buf) {}
|
||||
///
|
||||
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
||||
///
|
||||
|
@ -39,7 +39,7 @@ enum MacroType {
|
||||
class MacroData {
|
||||
public:
|
||||
/// Constructor to make STL containers happy
|
||||
MacroData(Buffer * buf = 0);
|
||||
explicit MacroData(Buffer * buf = 0);
|
||||
/// Create lazy MacroData which only queries the macro template when needed
|
||||
MacroData(Buffer * buf, DocIterator const & pos);
|
||||
/// Create non-lazy MacroData which directly queries the macro template
|
||||
|
@ -24,7 +24,7 @@ namespace lyx {
|
||||
class MathCompletionList : public CompletionList {
|
||||
public:
|
||||
///
|
||||
MathCompletionList(Cursor const & cur);
|
||||
explicit MathCompletionList(Cursor const & cur);
|
||||
///
|
||||
virtual ~MathCompletionList();
|
||||
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
|
||||
public:
|
||||
///
|
||||
MathData(Buffer * buf = 0) : minasc_(0), mindes_(0), slevel_(0),
|
||||
explicit MathData(Buffer * buf = 0) : minasc_(0), mindes_(0), slevel_(0),
|
||||
sshift_(0), buffer_(buf) {}
|
||||
///
|
||||
MathData(Buffer * buf, const_iterator from, const_iterator to);
|
||||
|
@ -307,7 +307,7 @@ public:
|
||||
class ETag {
|
||||
public:
|
||||
///
|
||||
ETag(char const * const tag) : tag_(tag) {}
|
||||
explicit ETag(char const * const tag) : tag_(tag) {}
|
||||
///
|
||||
char const * const tag_;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user