mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Fix warnings
This commit is contained in:
parent
33d663720b
commit
9afc001fc5
@ -30,12 +30,12 @@ Floating::Floating(string const & type, string const & placement,
|
||||
string const & listName, std::string const & listCmd,
|
||||
string const & refPrefix, std::string const & allowedplacement,
|
||||
string const & htmlTag, string const & htmlAttrib,
|
||||
docstring const & htmlStyle, string const & requires,
|
||||
docstring const & htmlStyle, string const & required,
|
||||
bool usesfloat, bool ispredefined,
|
||||
bool allowswide, bool allowssideways)
|
||||
: floattype_(type), placement_(placement), ext_(ext), within_(within),
|
||||
style_(style), name_(name), listname_(listName), listcommand_(listCmd),
|
||||
refprefix_(refPrefix), allowedplacement_(allowedplacement), required_(requires),
|
||||
refprefix_(refPrefix), allowedplacement_(allowedplacement), required_(required),
|
||||
usesfloatpkg_(usesfloat), ispredefined_(ispredefined),
|
||||
allowswide_(allowswide), allowssideways_(allowssideways),
|
||||
html_tag_(htmlTag), html_attrib_(htmlAttrib), html_style_(htmlStyle)
|
||||
|
@ -773,7 +773,7 @@ ostream & operator<<(ostream & os, FontInfo const & f)
|
||||
ostream & operator<<(ostream & os, Font const & font)
|
||||
{
|
||||
return os << font.bits_
|
||||
<< " lang: " << (font.lang_ ? font.lang_->lang() : 0);
|
||||
<< " lang: " << (font.lang_ ? font.lang_->lang() : nullptr);
|
||||
}
|
||||
|
||||
|
||||
|
@ -174,7 +174,7 @@ Format const * Formats::getFormat(string const & name) const
|
||||
if (cit != formatlist_.end())
|
||||
return &(*cit);
|
||||
else
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,40 +30,40 @@ FuncRequest const FuncRequest::unknown(LFUN_UNKNOWN_ACTION);
|
||||
FuncRequest const FuncRequest::noaction(LFUN_NOACTION);
|
||||
|
||||
FuncRequest::FuncRequest(Origin o)
|
||||
: action_(LFUN_NOACTION), origin_(o), view_origin_(0), x_(0), y_(0),
|
||||
: action_(LFUN_NOACTION), origin_(o), view_origin_(nullptr), x_(0), y_(0),
|
||||
button_(mouse_button::none), modifier_(NoModifier), allow_async_(true)
|
||||
{}
|
||||
|
||||
|
||||
FuncRequest::FuncRequest(FuncCode act, Origin o)
|
||||
: action_(act), origin_(o), view_origin_(0), x_(0), y_(0),
|
||||
: action_(act), origin_(o), view_origin_(nullptr), x_(0), y_(0),
|
||||
button_(mouse_button::none), modifier_(NoModifier), allow_async_(true)
|
||||
{}
|
||||
|
||||
|
||||
FuncRequest::FuncRequest(FuncCode act, docstring const & arg, Origin o)
|
||||
: action_(act), argument_(arg), origin_(o), view_origin_(0), x_(0), y_(0),
|
||||
: action_(act), argument_(arg), origin_(o), view_origin_(nullptr), x_(0), y_(0),
|
||||
button_(mouse_button::none), modifier_(NoModifier), allow_async_(true)
|
||||
{}
|
||||
|
||||
|
||||
FuncRequest::FuncRequest(FuncCode act, string const & arg, Origin o)
|
||||
: action_(act), argument_(from_utf8(arg)),
|
||||
origin_(o), view_origin_(0), x_(0), y_(0),
|
||||
origin_(o), view_origin_(nullptr), x_(0), y_(0),
|
||||
button_(mouse_button::none), modifier_(NoModifier), allow_async_(true)
|
||||
{}
|
||||
|
||||
|
||||
FuncRequest::FuncRequest(FuncCode act, int ax, int ay,
|
||||
mouse_button::state but, KeyModifier modifier, Origin o)
|
||||
: action_(act), origin_(o), view_origin_(0), x_(ax), y_(ay),
|
||||
: action_(act), origin_(o), view_origin_(nullptr), x_(ax), y_(ay),
|
||||
button_(but), modifier_(modifier), allow_async_(true)
|
||||
{}
|
||||
|
||||
|
||||
FuncRequest::FuncRequest(FuncRequest const & cmd, docstring const & arg, Origin o)
|
||||
: action_(cmd.action()), argument_(arg),
|
||||
origin_(o), view_origin_(0), x_(cmd.x_), y_(cmd.y_),
|
||||
origin_(o), view_origin_(nullptr), x_(cmd.x_), y_(cmd.y_),
|
||||
button_(cmd.button_), modifier_(NoModifier), allow_async_(true)
|
||||
{}
|
||||
|
||||
|
@ -140,7 +140,7 @@ Index * IndicesList::find(docstring const & name)
|
||||
{
|
||||
List::iterator it =
|
||||
find_if(list.begin(), list.end(), IndexNamesEqual(name));
|
||||
return it == list.end() ? 0 : &*it;
|
||||
return it == list.end() ? nullptr : &*it;
|
||||
}
|
||||
|
||||
|
||||
@ -148,7 +148,7 @@ Index const * IndicesList::find(docstring const & name) const
|
||||
{
|
||||
List::const_iterator it =
|
||||
find_if(list.begin(), list.end(), IndexNamesEqual(name));
|
||||
return it == list.end() ? 0 : &*it;
|
||||
return it == list.end() ? nullptr : &*it;
|
||||
}
|
||||
|
||||
|
||||
@ -156,7 +156,7 @@ Index * IndicesList::findShortcut(docstring const & shortcut)
|
||||
{
|
||||
List::iterator it =
|
||||
find_if(list.begin(), list.end(), IndexHasShortcut(shortcut));
|
||||
return it == list.end() ? 0 : &*it;
|
||||
return it == list.end() ? nullptr : &*it;
|
||||
}
|
||||
|
||||
|
||||
@ -164,7 +164,7 @@ Index const * IndicesList::findShortcut(docstring const & shortcut) const
|
||||
{
|
||||
List::const_iterator it =
|
||||
find_if(list.begin(), list.end(), IndexHasShortcut(shortcut));
|
||||
return it == list.end() ? 0 : &*it;
|
||||
return it == list.end() ? nullptr : &*it;
|
||||
}
|
||||
|
||||
|
||||
@ -189,10 +189,10 @@ bool IndicesList::add(docstring const & n, docstring const & s)
|
||||
in.setIndex(name);
|
||||
docstring sc = s.empty() ?
|
||||
trim(lowercase(name.substr(0, 3))) : s;
|
||||
if (findShortcut(sc) != 0) {
|
||||
if (findShortcut(sc) != nullptr) {
|
||||
int k = 1;
|
||||
docstring scn = sc + convert<docstring>(k);
|
||||
while (findShortcut(scn) != 0) {
|
||||
while (findShortcut(scn) != nullptr) {
|
||||
++k;
|
||||
scn = sc + convert<docstring>(k);
|
||||
}
|
||||
@ -211,7 +211,7 @@ bool IndicesList::add(docstring const & n, docstring const & s)
|
||||
|
||||
bool IndicesList::addDefault(docstring const & n)
|
||||
{
|
||||
if (findShortcut(from_ascii("idx")) != 0)
|
||||
if (findShortcut(from_ascii("idx")) != nullptr)
|
||||
// we already have a default
|
||||
return false;
|
||||
return add(n, from_ascii("idx"));
|
||||
|
@ -68,7 +68,7 @@ size_t KeyMap::bind(string const & seq, FuncRequest const & func)
|
||||
LYXERR(Debug::KBMAP, "BIND: Sequence `" << seq << "' Action `"
|
||||
<< func.action() << '\'');
|
||||
|
||||
KeySequence k(0, 0);
|
||||
KeySequence k(nullptr, nullptr);
|
||||
|
||||
string::size_type const res = k.parse(seq);
|
||||
if (res == string::npos) {
|
||||
@ -84,7 +84,7 @@ size_t KeyMap::bind(string const & seq, FuncRequest const & func)
|
||||
|
||||
size_t KeyMap::unbind(string const & seq, FuncRequest const & func)
|
||||
{
|
||||
KeySequence k(0, 0);
|
||||
KeySequence k(nullptr, nullptr);
|
||||
|
||||
string::size_type const res = k.parse(seq);
|
||||
if (res == string::npos)
|
||||
@ -497,7 +497,7 @@ docstring KeyMap::printBindings(FuncRequest const & func,
|
||||
|
||||
KeyMap::Bindings KeyMap::findBindings(FuncRequest const & func) const
|
||||
{
|
||||
return findBindings(func, KeySequence(0, 0));
|
||||
return findBindings(func, KeySequence(nullptr, nullptr));
|
||||
}
|
||||
|
||||
|
||||
@ -529,7 +529,7 @@ KeyMap::Bindings KeyMap::findBindings(FuncRequest const & func,
|
||||
KeyMap::BindingList KeyMap::listBindings(bool unbound, KeyMap::ItemType tag) const
|
||||
{
|
||||
BindingList list;
|
||||
listBindings(list, KeySequence(0, 0), tag);
|
||||
listBindings(list, KeySequence(nullptr, nullptr), tag);
|
||||
if (unbound) {
|
||||
LyXAction::const_iterator fit = lyxaction.func_begin();
|
||||
LyXAction::const_iterator const fen = lyxaction.func_end();
|
||||
@ -544,7 +544,7 @@ KeyMap::BindingList KeyMap::listBindings(bool unbound, KeyMap::ItemType tag) con
|
||||
break;
|
||||
}
|
||||
if (!has_action)
|
||||
list.push_back(Binding(FuncRequest(action), KeySequence(0, 0), tag));
|
||||
list.push_back(Binding(FuncRequest(action), KeySequence(nullptr, nullptr), tag));
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
Loading…
Reference in New Issue
Block a user