fix some GCC compilation issues

This commit is contained in:
Jinhao 2020-03-14 01:31:52 +08:00
parent e8668dbc52
commit 25fe4506fd
2 changed files with 5 additions and 4 deletions

View File

@ -1736,11 +1736,11 @@ namespace nana
//class trigger //class trigger
//struct treebox_node_type //struct treebox_node_type
trigger::treebox_node_type::treebox_node_type() trigger::treebox_node_type::treebox_node_type()
:expanded(false), checked(checkstate::unchecked), hidden(false) :expanded(false), hidden(false), checked(checkstate::unchecked)
{} {}
trigger::treebox_node_type::treebox_node_type(std::string text) trigger::treebox_node_type::treebox_node_type(std::string text)
:text(std::move(text)), expanded(false), checked(checkstate::unchecked), hidden(false) :text(std::move(text)), expanded(false), hidden(false), checked(checkstate::unchecked)
{} {}
trigger::treebox_node_type& trigger::treebox_node_type::operator=(const treebox_node_type& rhs) trigger::treebox_node_type& trigger::treebox_node_type::operator=(const treebox_node_type& rhs)

View File

@ -14,6 +14,7 @@
#define NANA_PAINT_DETAIL_IMAGE_BMP_HPP #define NANA_PAINT_DETAIL_IMAGE_BMP_HPP
#include <memory> #include <memory>
#include <cstring>
#include "image_pixbuf.hpp" #include "image_pixbuf.hpp"
namespace nana{ namespace paint namespace nana{ namespace paint
@ -132,7 +133,7 @@ namespace nana{ namespace paint
return false; return false;
} }
private: private:
std::unique_ptr<unsigned char[]> _m_decompress_rle8(const bitmap_info_header* header, const unsigned char* data, std::size_t data_size, std::size_t line_bytes) std::unique_ptr<unsigned char[]> _m_decompress_rle8(const bitmap_info_header* header, const unsigned char* data, std::size_t data_size)
{ {
std::size_t const lines = std::abs(header->biHeight); std::size_t const lines = std::abs(header->biHeight);
unsigned char* const indexes = new unsigned char[header->biWidth * lines]; unsigned char* const indexes = new unsigned char[header->biWidth * lines];
@ -222,7 +223,7 @@ namespace nana{ namespace paint
if (1 == header->biCompression) if (1 == header->biCompression)
{ {
indexes = _m_decompress_rle8(header, bits, length, line_bytes); indexes = _m_decompress_rle8(header, bits, length);
line_bytes = header->biWidth; line_bytes = header->biWidth;
bits = indexes.get(); bits = indexes.get();
} }