mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Remove redundant const &
for primitive types
This commit is contained in:
parent
26f3dfe45d
commit
65c88f0a0a
@ -3410,7 +3410,7 @@ docstring const & BufferView::inlineCompletion() const
|
||||
}
|
||||
|
||||
|
||||
size_t const & BufferView::inlineCompletionUniqueChars() const
|
||||
size_t BufferView::inlineCompletionUniqueChars() const
|
||||
{
|
||||
return d->inlineCompletionUniqueChars_;
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ public:
|
||||
/// return the inline completion postfix.
|
||||
docstring const & inlineCompletion() const;
|
||||
/// return the number of unique characters in the inline completion.
|
||||
size_t const & inlineCompletionUniqueChars() const;
|
||||
size_t inlineCompletionUniqueChars() const;
|
||||
/// return the position in the buffer of the inline completion postfix.
|
||||
DocIterator const & inlineCompletionPos() const;
|
||||
/// make sure inline completion position is OK
|
||||
|
@ -643,7 +643,7 @@ Encodings::fromLyXName(string const & name, bool allowUnsafe) const
|
||||
|
||||
|
||||
Encoding const *
|
||||
Encodings::fromLaTeXName(string const & n, int const & p, bool allowUnsafe) const
|
||||
Encodings::fromLaTeXName(string const & n, int p, bool allowUnsafe) const
|
||||
{
|
||||
string name = n;
|
||||
// FIXME: if we have to test for too many of these synonyms,
|
||||
@ -666,7 +666,7 @@ Encodings::fromLaTeXName(string const & n, int const & p, bool allowUnsafe) cons
|
||||
|
||||
|
||||
Encoding const *
|
||||
Encodings::fromIconvName(string const & n, int const & p, bool allowUnsafe) const
|
||||
Encodings::fromIconvName(string const & n, int p, bool allowUnsafe) const
|
||||
{
|
||||
EncodingList::const_iterator const end = encodinglist.end();
|
||||
for (EncodingList::const_iterator it = encodinglist.begin(); it != end; ++it)
|
||||
|
@ -255,10 +255,10 @@ public:
|
||||
fromLyXName(std::string const & name, bool allowUnsafe = false) const;
|
||||
/// Get encoding from LaTeX name \p name and package \p package
|
||||
Encoding const * fromLaTeXName(std::string const & name,
|
||||
int const & package = Encoding::any, bool allowUnsafe = false) const;
|
||||
int package = Encoding::any, bool allowUnsafe = false) const;
|
||||
/// Get encoding from iconv name \p name and package \p package
|
||||
Encoding const * fromIconvName(std::string const & name,
|
||||
int const & package = Encoding::any, bool allowUnsafe = false) const;
|
||||
int package = Encoding::any, bool allowUnsafe = false) const;
|
||||
|
||||
///
|
||||
const_iterator begin() const { return encodinglist.begin(); }
|
||||
|
@ -228,8 +228,8 @@ int Font::latexWriteStartChanges(otexstream & os, BufferParams const & bparams,
|
||||
OutputParams const & runparams,
|
||||
Font const & base,
|
||||
Font const & prev,
|
||||
bool const & non_inherit_inset,
|
||||
bool const & needs_cprotection) const
|
||||
bool non_inherit_inset,
|
||||
bool needs_cprotection) const
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
@ -522,7 +522,7 @@ int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams,
|
||||
Font const & base,
|
||||
Font const & next,
|
||||
bool & needPar,
|
||||
bool const & closeLanguage) const
|
||||
bool closeLanguage) const
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
|
@ -76,8 +76,8 @@ public:
|
||||
OutputParams const & runparams,
|
||||
Font const & base,
|
||||
Font const & prev,
|
||||
bool const & non_inherit_inset = false,
|
||||
bool const & needs_cprotection = false) const;
|
||||
bool non_inherit_inset = false,
|
||||
bool needs_cprotection = false) const;
|
||||
|
||||
/** Writes the tail of the LaTeX needed to change to this font.
|
||||
Returns number of chars written. Base is the font state we want
|
||||
@ -88,7 +88,7 @@ public:
|
||||
Font const & base,
|
||||
Font const & next,
|
||||
bool & needPar,
|
||||
bool const & closeLanguage = true) const;
|
||||
bool closeLanguage = true) const;
|
||||
|
||||
|
||||
/// Build GUI description of font state
|
||||
|
@ -292,8 +292,7 @@ string const LaTeXFont::getPackageOptions(bool ot1, bool complete, bool sc, bool
|
||||
|
||||
|
||||
string const LaTeXFont::getLaTeXCode(bool dryrun, bool ot1, bool complete, bool sc,
|
||||
bool osf, bool nomath, string const & extraopts,
|
||||
int const & scale)
|
||||
bool osf, bool nomath, string const & extraopts, int scale)
|
||||
{
|
||||
ostringstream os;
|
||||
|
||||
|
@ -90,7 +90,7 @@ public:
|
||||
std::string const getLaTeXCode(bool dryrun, bool ot1, bool complete,
|
||||
bool sc, bool osf, bool nomath,
|
||||
std::string const & extraopts = std::string(),
|
||||
int const & scale = 100);
|
||||
int scale = 100);
|
||||
/// Return the actually used font
|
||||
docstring const getUsedFont(bool ot1, bool complete, bool nomath, bool osf);
|
||||
/// Return the actually used package
|
||||
|
@ -490,7 +490,7 @@ public:
|
||||
///
|
||||
docstring const & htmlstyles() const { return htmlstyles_; }
|
||||
///
|
||||
bool const & docbookforceabstract() const { return docbookforceabstract_; }
|
||||
bool docbookforceabstract() const { return docbookforceabstract_; }
|
||||
///
|
||||
std::string const & docbookroot() const { return docbookroot_; }
|
||||
/// Looks for the layout of "highest level", other than Part (or other
|
||||
|
@ -45,7 +45,7 @@ int prompt(docstring const & title, docstring const & question,
|
||||
* The console output takes care of converting any Qt html to plain text.
|
||||
*/
|
||||
void warning(docstring const & title, docstring const & message,
|
||||
bool const & askshowagain = false);
|
||||
bool askshowagain = false);
|
||||
|
||||
/**
|
||||
* Display a warning to the user. Title should be a short (general) summary.
|
||||
|
@ -89,7 +89,7 @@ void FloatPlacement::useSideways()
|
||||
}
|
||||
|
||||
|
||||
bool FloatPlacement::possiblePlacement(char const & p) const
|
||||
bool FloatPlacement::possiblePlacement(char p) const
|
||||
{
|
||||
return !spanCB->isVisible() || contains(allowed_placement_, p);
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ private:
|
||||
///
|
||||
void initFloatPlacementCO(bool const);
|
||||
///
|
||||
bool possiblePlacement(char const & p) const;
|
||||
bool possiblePlacement(char p) const;
|
||||
|
||||
/// one of figure or table?
|
||||
bool standardfloat_;
|
||||
|
@ -150,7 +150,7 @@ int prompt(docstring const & title, docstring const & question,
|
||||
}
|
||||
|
||||
void doWarning(docstring const & title, docstring const & message,
|
||||
bool const & askshowagain)
|
||||
bool askshowagain)
|
||||
{
|
||||
lyxerr << "Warning: " << toPlainText(title) << '\n'
|
||||
<< "----------------------------------------\n"
|
||||
@ -190,7 +190,7 @@ void doWarning(docstring const & title, docstring const & message,
|
||||
}
|
||||
|
||||
void warning(docstring const & title, docstring const & message,
|
||||
bool const & askshowagain)
|
||||
bool askshowagain)
|
||||
{
|
||||
#ifdef EXPORT_in_THREAD
|
||||
InGuiThread<void>().call(&doWarning,
|
||||
|
@ -198,7 +198,7 @@ string widgetToDoubleStr(QLineEdit const * input)
|
||||
}
|
||||
|
||||
|
||||
void doubleToWidget(QLineEdit * input, double const & value, char f, int prec)
|
||||
void doubleToWidget(QLineEdit * input, double value, char f, int prec)
|
||||
{
|
||||
QLocale loc;
|
||||
loc.setNumberOptions(QLocale::OmitGroupSeparator);
|
||||
|
@ -61,7 +61,7 @@ double widgetToDouble(QLineEdit const * input);
|
||||
/// method to get a double value from a localized widget (QLineEdit)
|
||||
std::string widgetToDoubleStr(QLineEdit const * input);
|
||||
/// method to set a (localized) double value in a widget (QLineEdit)
|
||||
void doubleToWidget(QLineEdit * input, double const & value,
|
||||
void doubleToWidget(QLineEdit * input, double value,
|
||||
char f = 'g', int prec = 6);
|
||||
/// method to set a (localized) double value in a widget (QLineEdit)
|
||||
void doubleToWidget(QLineEdit * input, std::string const & value,
|
||||
|
@ -20,7 +20,7 @@ using namespace std;
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
namespace Alert {
|
||||
void warning(docstring const & title, docstring const & message, bool const &)
|
||||
void warning(docstring const & title, docstring const & message, bool)
|
||||
{
|
||||
LYXERR0(title);
|
||||
LYXERR0(message);
|
||||
|
@ -196,7 +196,7 @@ void Parser::deparse()
|
||||
}
|
||||
|
||||
|
||||
bool Parser::setEncoding(std::string const & e, int const & p)
|
||||
bool Parser::setEncoding(std::string const & e, int p)
|
||||
{
|
||||
// We may (and need to) use unsafe encodings here: Since the text is
|
||||
// converted to unicode while reading from is_, we never see text in
|
||||
|
@ -187,7 +187,7 @@ public:
|
||||
|
||||
/// change the encoding of the input stream according to \p encoding
|
||||
/// (latex name) and package \p package
|
||||
bool setEncoding(std::string const & encoding, int const & package);
|
||||
bool setEncoding(std::string const & encoding, int package);
|
||||
/// change the encoding of the input stream to \p encoding (iconv name)
|
||||
bool setEncoding(std::string const & encoding);
|
||||
/// get the current iconv encoding of the input stream
|
||||
|
@ -38,8 +38,7 @@ namespace lyx {
|
||||
|
||||
namespace frontend {
|
||||
namespace Alert {
|
||||
void warning(docstring const & title, docstring const & message,
|
||||
bool const &)
|
||||
void warning(docstring const & title, docstring const & message, bool)
|
||||
{
|
||||
cerr << to_utf8(title) << "\n" << to_utf8(message) << endl;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user