fix some issues that are detected by PVS-studio team
This commit is contained in:
parent
31455aa165
commit
0a0fab679b
@ -665,8 +665,7 @@ namespace nana{ namespace widgets{ namespace skeletons
|
|||||||
case token::eof:
|
case token::eof:
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
int * debug = 0; //for debug.
|
throw std::runtime_error("invalid token");
|
||||||
*debug = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -293,7 +293,7 @@ namespace detail
|
|||||||
auto result = native_interface::create_window(native, nested, r, app);
|
auto result = native_interface::create_window(native, nested, r, app);
|
||||||
if (result.native_handle)
|
if (result.native_handle)
|
||||||
{
|
{
|
||||||
core_window_t* wd = new core_window_t(owner, widget_notifier_interface::get_notifier(wdg), (category::root_tag**)nullptr);
|
auto wd = new core_window_t(owner, widget_notifier_interface::get_notifier(wdg), (category::root_tag**)nullptr);
|
||||||
if (nested)
|
if (nested)
|
||||||
{
|
{
|
||||||
wd->owner = nullptr;
|
wd->owner = nullptr;
|
||||||
|
|||||||
@ -1312,7 +1312,7 @@ namespace nana{ namespace widgets
|
|||||||
|
|
||||||
void text_editor::set_highlight(const std::string& name, const ::nana::color& fgcolor, const ::nana::color& bgcolor)
|
void text_editor::set_highlight(const std::string& name, const ::nana::color& fgcolor, const ::nana::color& bgcolor)
|
||||||
{
|
{
|
||||||
if (fgcolor.invisible() && fgcolor.invisible())
|
if (fgcolor.invisible() && bgcolor.invisible())
|
||||||
{
|
{
|
||||||
keywords_->schemes.erase(name);
|
keywords_->schemes.erase(name);
|
||||||
return;
|
return;
|
||||||
@ -3259,7 +3259,7 @@ namespace nana{ namespace widgets
|
|||||||
else if (pos <= a.x && a.x < str_end)
|
else if (pos <= a.x && a.x < str_end)
|
||||||
{ //Partial selected
|
{ //Partial selected
|
||||||
int endpos = static_cast<int>(b.x < str_end ? b.x : str_end);
|
int endpos = static_cast<int>(b.x < str_end ? b.x : str_end);
|
||||||
std::unique_ptr<unsigned> pxbuf_ptr(new unsigned[len]);
|
std::unique_ptr<unsigned[]> pxbuf_ptr(new unsigned[len]);
|
||||||
unsigned * pxbuf = pxbuf_ptr.get();
|
unsigned * pxbuf = pxbuf_ptr.get();
|
||||||
if (graph_.glyph_pixels(ent.begin, len, pxbuf))
|
if (graph_.glyph_pixels(ent.begin, len, pxbuf))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user