mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-10 18:58:10 +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 & listName, std::string const & listCmd,
|
||||||
string const & refPrefix, std::string const & allowedplacement,
|
string const & refPrefix, std::string const & allowedplacement,
|
||||||
string const & htmlTag, string const & htmlAttrib,
|
string const & htmlTag, string const & htmlAttrib,
|
||||||
docstring const & htmlStyle, string const & requires,
|
docstring const & htmlStyle, string const & required,
|
||||||
bool usesfloat, bool ispredefined,
|
bool usesfloat, bool ispredefined,
|
||||||
bool allowswide, bool allowssideways)
|
bool allowswide, bool allowssideways)
|
||||||
: floattype_(type), placement_(placement), ext_(ext), within_(within),
|
: floattype_(type), placement_(placement), ext_(ext), within_(within),
|
||||||
style_(style), name_(name), listname_(listName), listcommand_(listCmd),
|
style_(style), name_(name), listname_(listName), listcommand_(listCmd),
|
||||||
refprefix_(refPrefix), allowedplacement_(allowedplacement), required_(requires),
|
refprefix_(refPrefix), allowedplacement_(allowedplacement), required_(required),
|
||||||
usesfloatpkg_(usesfloat), ispredefined_(ispredefined),
|
usesfloatpkg_(usesfloat), ispredefined_(ispredefined),
|
||||||
allowswide_(allowswide), allowssideways_(allowssideways),
|
allowswide_(allowswide), allowssideways_(allowssideways),
|
||||||
html_tag_(htmlTag), html_attrib_(htmlAttrib), html_style_(htmlStyle)
|
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)
|
ostream & operator<<(ostream & os, Font const & font)
|
||||||
{
|
{
|
||||||
return os << font.bits_
|
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())
|
if (cit != formatlist_.end())
|
||||||
return &(*cit);
|
return &(*cit);
|
||||||
else
|
else
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,40 +30,40 @@ FuncRequest const FuncRequest::unknown(LFUN_UNKNOWN_ACTION);
|
|||||||
FuncRequest const FuncRequest::noaction(LFUN_NOACTION);
|
FuncRequest const FuncRequest::noaction(LFUN_NOACTION);
|
||||||
|
|
||||||
FuncRequest::FuncRequest(Origin o)
|
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)
|
button_(mouse_button::none), modifier_(NoModifier), allow_async_(true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
FuncRequest::FuncRequest(FuncCode act, Origin o)
|
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)
|
button_(mouse_button::none), modifier_(NoModifier), allow_async_(true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
FuncRequest::FuncRequest(FuncCode act, docstring const & arg, Origin o)
|
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)
|
button_(mouse_button::none), modifier_(NoModifier), allow_async_(true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
FuncRequest::FuncRequest(FuncCode act, string const & arg, Origin o)
|
FuncRequest::FuncRequest(FuncCode act, string const & arg, Origin o)
|
||||||
: action_(act), argument_(from_utf8(arg)),
|
: 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)
|
button_(mouse_button::none), modifier_(NoModifier), allow_async_(true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
FuncRequest::FuncRequest(FuncCode act, int ax, int ay,
|
FuncRequest::FuncRequest(FuncCode act, int ax, int ay,
|
||||||
mouse_button::state but, KeyModifier modifier, Origin o)
|
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)
|
button_(but), modifier_(modifier), allow_async_(true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
FuncRequest::FuncRequest(FuncRequest const & cmd, docstring const & arg, Origin o)
|
FuncRequest::FuncRequest(FuncRequest const & cmd, docstring const & arg, Origin o)
|
||||||
: action_(cmd.action()), argument_(arg),
|
: 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)
|
button_(cmd.button_), modifier_(NoModifier), allow_async_(true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ Index * IndicesList::find(docstring const & name)
|
|||||||
{
|
{
|
||||||
List::iterator it =
|
List::iterator it =
|
||||||
find_if(list.begin(), list.end(), IndexNamesEqual(name));
|
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 =
|
List::const_iterator it =
|
||||||
find_if(list.begin(), list.end(), IndexNamesEqual(name));
|
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 =
|
List::iterator it =
|
||||||
find_if(list.begin(), list.end(), IndexHasShortcut(shortcut));
|
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 =
|
List::const_iterator it =
|
||||||
find_if(list.begin(), list.end(), IndexHasShortcut(shortcut));
|
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);
|
in.setIndex(name);
|
||||||
docstring sc = s.empty() ?
|
docstring sc = s.empty() ?
|
||||||
trim(lowercase(name.substr(0, 3))) : s;
|
trim(lowercase(name.substr(0, 3))) : s;
|
||||||
if (findShortcut(sc) != 0) {
|
if (findShortcut(sc) != nullptr) {
|
||||||
int k = 1;
|
int k = 1;
|
||||||
docstring scn = sc + convert<docstring>(k);
|
docstring scn = sc + convert<docstring>(k);
|
||||||
while (findShortcut(scn) != 0) {
|
while (findShortcut(scn) != nullptr) {
|
||||||
++k;
|
++k;
|
||||||
scn = sc + convert<docstring>(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)
|
bool IndicesList::addDefault(docstring const & n)
|
||||||
{
|
{
|
||||||
if (findShortcut(from_ascii("idx")) != 0)
|
if (findShortcut(from_ascii("idx")) != nullptr)
|
||||||
// we already have a default
|
// we already have a default
|
||||||
return false;
|
return false;
|
||||||
return add(n, from_ascii("idx"));
|
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 `"
|
LYXERR(Debug::KBMAP, "BIND: Sequence `" << seq << "' Action `"
|
||||||
<< func.action() << '\'');
|
<< func.action() << '\'');
|
||||||
|
|
||||||
KeySequence k(0, 0);
|
KeySequence k(nullptr, nullptr);
|
||||||
|
|
||||||
string::size_type const res = k.parse(seq);
|
string::size_type const res = k.parse(seq);
|
||||||
if (res == string::npos) {
|
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)
|
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);
|
string::size_type const res = k.parse(seq);
|
||||||
if (res == string::npos)
|
if (res == string::npos)
|
||||||
@ -497,7 +497,7 @@ docstring KeyMap::printBindings(FuncRequest const & func,
|
|||||||
|
|
||||||
KeyMap::Bindings KeyMap::findBindings(FuncRequest const & func) const
|
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
|
KeyMap::BindingList KeyMap::listBindings(bool unbound, KeyMap::ItemType tag) const
|
||||||
{
|
{
|
||||||
BindingList list;
|
BindingList list;
|
||||||
listBindings(list, KeySequence(0, 0), tag);
|
listBindings(list, KeySequence(nullptr, nullptr), tag);
|
||||||
if (unbound) {
|
if (unbound) {
|
||||||
LyXAction::const_iterator fit = lyxaction.func_begin();
|
LyXAction::const_iterator fit = lyxaction.func_begin();
|
||||||
LyXAction::const_iterator const fen = lyxaction.func_end();
|
LyXAction::const_iterator const fen = lyxaction.func_end();
|
||||||
@ -544,7 +544,7 @@ KeyMap::BindingList KeyMap::listBindings(bool unbound, KeyMap::ItemType tag) con
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!has_action)
|
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;
|
return list;
|
||||||
|
Loading…
Reference in New Issue
Block a user