Fixed some MinGW warnings

This commit is contained in:
cnjinhao 2015-01-12 05:27:11 +08:00
parent 41b04d0bbd
commit 0474299bdc
5 changed files with 102 additions and 110 deletions

View File

@ -1,24 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file> <CodeBlocks_layout_file>
<ActiveTarget name="Debug" /> <ActiveTarget name="Debug" />
<File name="..\..\source\gui\element.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="..\..\source\gui\widgets\categorize.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="20890" topLine="542" /> <Cursor1 position="6160" topLine="196" />
</Cursor> </Cursor>
</File> </File>
<File name="..\..\source\gui\filebox.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="..\..\source\gui\animation.cpp" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="22934" topLine="871" /> <Cursor1 position="1164" topLine="43" />
</Cursor> </Cursor>
</File> </File>
<File name="..\..\source\audio\detail\buffer_preparation.cpp" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="..\..\source\gui\widgets\checkbox.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="1924" topLine="62" /> <Cursor1 position="6998" topLine="275" />
</Cursor> </Cursor>
</File> </File>
<File name="..\..\source\gui\msgbox.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="..\..\source\gui\widgets\combox.cpp" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="48249" topLine="407" /> <Cursor1 position="16572" topLine="610" />
</Cursor>
</File>
<File name="..\..\source\threads\pool.cpp" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5569" topLine="249" />
</Cursor>
</File>
<File name="..\..\source\gui\widgets\date_chooser.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="457" topLine="3" />
</Cursor>
</File>
<File name="..\..\source\gui\widgets\listbox.cpp" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="12428" topLine="532" />
</Cursor>
</File>
<File name="..\..\source\gui\widgets\menu.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="27717" topLine="1044" />
</Cursor>
</File>
<File name="..\..\source\gui\detail\native_window_interface.cpp" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4901" topLine="171" />
</Cursor>
</File>
<File name="..\..\source\gui\detail\window_layout.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5198" topLine="161" />
</Cursor> </Cursor>
</File> </File>
<File name="..\..\source\gui\widgets\tabbar.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="..\..\source\gui\widgets\tabbar.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -26,9 +56,9 @@
<Cursor1 position="18615" topLine="760" /> <Cursor1 position="18615" topLine="760" />
</Cursor> </Cursor>
</File> </File>
<File name="..\..\source\audio\detail\audio_device.cpp" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="..\..\source\gui\detail\window_manager.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="6256" topLine="215" /> <Cursor1 position="30124" topLine="1046" />
</Cursor> </Cursor>
</File> </File>
<File name="..\..\source\gui\widgets\textbox.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="..\..\source\gui\widgets\textbox.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -36,9 +66,9 @@
<Cursor1 position="11188" topLine="459" /> <Cursor1 position="11188" topLine="459" />
</Cursor> </Cursor>
</File> </File>
<File name="..\..\source\charset.cpp" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="..\..\source\gui\dragger.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="412" topLine="15" /> <Cursor1 position="1316" topLine="59" />
</Cursor> </Cursor>
</File> </File>
<File name="..\..\source\gui\widgets\toolbar.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="..\..\source\gui\widgets\toolbar.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -56,19 +86,54 @@
<Cursor1 position="587" topLine="2" /> <Cursor1 position="587" topLine="2" />
</Cursor> </Cursor>
</File> </File>
<File name="..\..\source\gui\element.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="20890" topLine="542" />
</Cursor>
</File>
<File name="..\..\source\gui\filebox.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="22934" topLine="871" />
</Cursor>
</File>
<File name="..\..\source\charset.cpp" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="412" topLine="15" />
</Cursor>
</File>
<File name="..\..\source\gui\msgbox.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="48249" topLine="407" />
</Cursor>
</File>
<File name="..\..\source\audio\detail\buffer_preparation.cpp" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1924" topLine="62" />
</Cursor>
</File>
<File name="..\..\source\paint\graphics.cpp" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="30961" topLine="1020" />
</Cursor>
</File>
<File name="..\..\source\gui\programming_interface.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="..\..\source\gui\programming_interface.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="5022" topLine="159" /> <Cursor1 position="5022" topLine="159" />
</Cursor> </Cursor>
</File> </File>
<File name="..\..\source\filesystem\fs_utility.cpp" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="..\..\source\paint\image.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="1562" topLine="57" /> <Cursor1 position="3714" topLine="168" />
</Cursor> </Cursor>
</File> </File>
<File name="..\..\source\gui\animation.cpp" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="..\..\source\audio\detail\audio_device.cpp" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="1164" topLine="43" /> <Cursor1 position="6256" topLine="215" />
</Cursor>
</File>
<File name="..\..\source\paint\text_renderer.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5894" topLine="205" />
</Cursor> </Cursor>
</File> </File>
<File name="..\..\source\gui\tooltip.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="..\..\source\gui\tooltip.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -81,74 +146,9 @@
<Cursor1 position="7080" topLine="291" /> <Cursor1 position="7080" topLine="291" />
</Cursor> </Cursor>
</File> </File>
<File name="..\..\source\paint\graphics.cpp" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="..\..\source\filesystem\fs_utility.cpp" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="30961" topLine="1020" /> <Cursor1 position="1562" topLine="57" />
</Cursor>
</File>
<File name="..\..\source\gui\widgets\categorize.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6160" topLine="196" />
</Cursor>
</File>
<File name="..\..\source\paint\image.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3714" topLine="168" />
</Cursor>
</File>
<File name="..\..\source\gui\widgets\checkbox.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6998" topLine="275" />
</Cursor>
</File>
<File name="..\..\source\gui\widgets\combox.cpp" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="16572" topLine="610" />
</Cursor>
</File>
<File name="..\..\source\gui\widgets\date_chooser.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="457" topLine="3" />
</Cursor>
</File>
<File name="..\..\source\paint\text_renderer.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5894" topLine="205" />
</Cursor>
</File>
<File name="..\..\source\threads\pool.cpp" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5569" topLine="249" />
</Cursor>
</File>
<File name="..\..\source\gui\detail\native_window_interface.cpp" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4901" topLine="171" />
</Cursor>
</File>
<File name="..\..\source\gui\detail\window_layout.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5198" topLine="161" />
</Cursor>
</File>
<File name="..\..\source\gui\widgets\listbox.cpp" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="12428" topLine="532" />
</Cursor>
</File>
<File name="..\..\source\gui\detail\window_manager.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="30124" topLine="1046" />
</Cursor>
</File>
<File name="..\..\source\gui\widgets\menu.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="27717" topLine="1044" />
</Cursor>
</File>
<File name="..\..\source\gui\dragger.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1316" topLine="59" />
</Cursor> </Cursor>
</File> </File>
</CodeBlocks_layout_file> </CodeBlocks_layout_file>

View File

@ -63,10 +63,9 @@ namespace nana
struct frame_tag: widget_tag{ static const flags value = flags::frame; }; struct frame_tag: widget_tag{ static const flags value = flags::frame; };
}// end namespace category }// end namespace category
typedef detail::native_window_handle_impl * native_window_type; using native_window_type = detail::native_window_handle_impl*;
using window = detail::window_handle_impl*; ///< \see [What is window class ](https://sourceforge.net/p/nanapro/discussion/general/thread/bd0fabfb/)
typedef detail::window_handle_impl* window; ///< \see [What is window class ](https://sourceforge.net/p/nanapro/discussion/general/thread/bd0fabfb/) using event_handle = detail::event_handle_impl*;
typedef detail::event_handle_impl* event_handle;
struct keyboard struct keyboard

View File

@ -7,7 +7,7 @@
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt) * http://www.boost.org/LICENSE_1_0.txt)
* *
* @file: nana/gui/color_schemes.hpp * @file: nana/gui/widget_colors.hpp
* @description: * @description:
*/ */
#ifndef NANA_DETAIL_WIDGET_COLORS_HPP #ifndef NANA_DETAIL_WIDGET_COLORS_HPP

View File

@ -44,12 +44,12 @@ namespace nana
{} {}
color::color(unsigned red, unsigned green, unsigned blue) color::color(unsigned red, unsigned green, unsigned blue)
: a_(1.0), r_(red), g_(green), b_(blue) : r_(red), g_(green), b_(blue), a_(1.0)
{ {
} }
color::color(unsigned red, unsigned green, unsigned blue, double alpha) color::color(unsigned red, unsigned green, unsigned blue, double alpha)
: a_(alpha), r_(red), g_(green), b_(blue) : r_(red), g_(green), b_(blue), a_(alpha)
{ {
if (alpha < 0.0) if (alpha < 0.0)
a_ = 0.0; a_ = 0.0;

View File

@ -228,18 +228,11 @@ namespace nana{ namespace paint
auto d = rawptr; auto d = rawptr;
const unsigned char* s; const unsigned char* s;
int src_bytes_per_line;
if (is_negative) if (is_negative)
{
s = rawbits; s = rawbits;
src_bytes_per_line = -static_cast<int>(bytes_per_line);
}
else else
{
s = rawbits + bytes_per_line * (height - 1); s = rawbits + bytes_per_line * (height - 1);
src_bytes_per_line = static_cast<int>(bytes_per_line);
}
for(std::size_t i = 0; i < height; ++i) for(std::size_t i = 0; i < height; ++i)
{ {