fix clang compiling errors
This commit is contained in:
parent
81a50fd84f
commit
e0a9a94a8b
@ -266,7 +266,7 @@ namespace nana
|
|||||||
return (this->empty() == false);
|
return (this->empty() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
window handle() const
|
window handle() const override
|
||||||
{
|
{
|
||||||
return handle_;
|
return handle_;
|
||||||
}
|
}
|
||||||
@ -349,7 +349,7 @@ namespace nana
|
|||||||
API::activate_window(handle_);
|
API::activate_window(handle_);
|
||||||
}
|
}
|
||||||
|
|
||||||
window handle() const
|
window handle() const override
|
||||||
{
|
{
|
||||||
return handle_;
|
return handle_;
|
||||||
}
|
}
|
||||||
@ -508,7 +508,7 @@ namespace nana
|
|||||||
return (this->empty() == false);
|
return (this->empty() == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
window handle() const
|
window handle() const override
|
||||||
{
|
{
|
||||||
return handle_;
|
return handle_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Graphics Gadget Implementation
|
* Graphics Gadget Implementation
|
||||||
* Copyright(C) 2003-2013 Jinhao(cnjinhao@hotmail.com)
|
* Nana C++ Library(http://www.nanapro.org)
|
||||||
|
* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
|
||||||
*
|
*
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@ -21,8 +22,8 @@ namespace paint
|
|||||||
{
|
{
|
||||||
namespace gadget
|
namespace gadget
|
||||||
{
|
{
|
||||||
void close_16_pixels(nana::paint::graphics&, int x, int y, uint32_t style, const color&);
|
void close_16_pixels(::nana::paint::graphics&, int x, int y, unsigned style, const color&);
|
||||||
void cross(nana::paint::graphics&, int x, int y, uint32_t size, uint32_t thickness, const nana::color&);
|
void cross(::nana::paint::graphics&, int x, int y, unsigned size, unsigned thickness, const nana::color&);
|
||||||
|
|
||||||
}//end namespace gadget
|
}//end namespace gadget
|
||||||
|
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#include <nana/basic_types.hpp>
|
#include <nana/basic_types.hpp>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
namespace nana
|
namespace nana
|
||||||
{
|
{
|
||||||
@ -102,7 +103,12 @@ namespace nana
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::transform(css_color.begin(), css_color.end(), css_color.begin(), std::tolower);
|
//std::tolower is not allowed because of concept requirements
|
||||||
|
std::transform(css_color.begin(), css_color.end(), css_color.begin(), [](char ch){
|
||||||
|
if('A' <= ch && ch <= 'Z')
|
||||||
|
return static_cast<char>(ch - ('A' - 'a'));
|
||||||
|
return ch;
|
||||||
|
});
|
||||||
auto endpos = css_color.find(' ', pos + 1);
|
auto endpos = css_color.find(' ', pos + 1);
|
||||||
if (endpos == css_color.npos)
|
if (endpos == css_color.npos)
|
||||||
endpos = css_color.size();
|
endpos = css_color.size();
|
||||||
@ -144,11 +150,8 @@ namespace nana
|
|||||||
|
|
||||||
rgb.emplace_back(i->str());
|
rgb.emplace_back(i->str());
|
||||||
|
|
||||||
bool is_real;
|
const bool is_real = (rgb.back().back() == '%');
|
||||||
if (is_real = (rgb.back().back() == '%'))
|
pat.assign(is_real ? "(\\d*\\.)?\\d+\\%" : "\\d+");
|
||||||
pat.assign("(\\d*\\.)?\\d+\\%");
|
|
||||||
else
|
|
||||||
pat.assign("\\d+");
|
|
||||||
|
|
||||||
for (++i; i != end; ++i)
|
for (++i; i != end; ++i)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* The Deploy Implementation
|
* The Deploy Implementation
|
||||||
* Copyright(C) 2003-2013 Jinhao(cnjinhao@hotmail.com)
|
* Nana C++ Library(http://www.nanapro.org)
|
||||||
|
* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
|
||||||
*
|
*
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@ -13,7 +14,7 @@
|
|||||||
|
|
||||||
#include <nana/deploy.hpp>
|
#include <nana/deploy.hpp>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <exception>
|
#include <stdexcept>
|
||||||
#if defined(NANA_WINDOWS)
|
#if defined(NANA_WINDOWS)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#elif defined(NANA_LINUX)
|
#elif defined(NANA_LINUX)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Graphics Gadget Implementation
|
* Graphics Gadget Implementation
|
||||||
* Nana C++ Library(http://www.nanapro.org)
|
* Nana C++ Library(http://www.nanapro.org)
|
||||||
* Copyright(C) 2003-2014 Jinhao(cnjinhao@hotmail.com)
|
* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
|
||||||
*
|
*
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@ -19,7 +19,7 @@ namespace paint
|
|||||||
{
|
{
|
||||||
namespace gadget
|
namespace gadget
|
||||||
{
|
{
|
||||||
void close_16_pixels(::nana::paint::graphics& graph, int x, int y, uint32_t style, const ::nana::color& clr)
|
void close_16_pixels(::nana::paint::graphics& graph, int x, int y, unsigned style, const ::nana::color& clr)
|
||||||
{
|
{
|
||||||
graph.set_color(clr);
|
graph.set_color(clr);
|
||||||
if(0 == style)
|
if(0 == style)
|
||||||
@ -50,7 +50,7 @@ namespace gadget
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cross(graphics& graph, int x, int y, uint32_t size, uint32_t thickness, const ::nana::color& color)
|
void cross(graphics& graph, int x, int y, unsigned size, unsigned thickness, const ::nana::color& clr)
|
||||||
{
|
{
|
||||||
if (thickness + 2 <= size)
|
if (thickness + 2 <= size)
|
||||||
{
|
{
|
||||||
@ -91,17 +91,15 @@ namespace gadget
|
|||||||
ps[11].x = x + gap;
|
ps[11].x = x + gap;
|
||||||
ps[11].y = y + gap;
|
ps[11].y = y + gap;
|
||||||
|
|
||||||
auto darker = color.blend(colors::black, true);
|
graph.set_color(clr.blend(colors::black, true));
|
||||||
graph.set_color(darker);
|
|
||||||
|
|
||||||
for (int i = 0; i < 11; ++i)
|
for (int i = 0; i < 11; ++i)
|
||||||
graph.line(ps[i], ps[i + 1]);
|
graph.line(ps[i], ps[i + 1]);
|
||||||
graph.line(ps[11], ps[0]);
|
graph.line(ps[11], ps[0]);
|
||||||
|
|
||||||
graph.set_color(color);
|
graph.set_color(clr);
|
||||||
graph.rectangle(rectangle{ ps[10].x + 1, ps[10].y + 1, (gap << 1) + thickness - 2, thickness - 2 }, true);
|
graph.rectangle(rectangle{ ps[10].x + 1, ps[10].y + 1, (gap << 1) + thickness - 2, thickness - 2 }, true);
|
||||||
graph.rectangle(rectangle{ ps[0].x + 1, ps[0].y + 1, thickness - 2, (gap << 1) + thickness - 2 }, true);
|
graph.rectangle(rectangle{ ps[0].x + 1, ps[0].y + 1, thickness - 2, (gap << 1) + thickness - 2 }, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}//end namespace gadget
|
}//end namespace gadget
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user