Delete unneeded test code.

This commit is contained in:
King_DuckZ 2018-09-05 01:42:06 +01:00
commit 384ed98f12

View file

@ -12,51 +12,6 @@
#include <climits>
#include <fstream>
namespace {
// std::vector<char> make_checker_bitmap (int32_t w, int32_t h, bool inv) {
// const int32_t scanline_size = ((w * 3 * CHAR_BIT + 31) bitand ~31) / CHAR_BIT;
// std::vector<char> retval(
// sizeof(bmp::FileHeader) +
// sizeof(bmp::ImageHeader) +
// scanline_size * h
// );
//
// bmp::FileHeader fhead;
// bmp::ImageHeader ihead;
//
// uint32_t copy_offs = sizeof(bmp::FileHeader) + sizeof(bmp::ImageHeader);
//
// fhead.bfSizeHi = static_cast<uint16_t>(retval.size() >> 16);
// fhead.bfSizeLo = static_cast<uint16_t>(retval.size() & 0xFFFF);
// fhead.bfOffBitsHi = static_cast<uint16_t>(copy_offs >> 16);
// fhead.bfOffBitsLo = static_cast<uint16_t>(copy_offs & 0xFFFF);
// ihead.biWidth = w;
// ihead.biHeight = h;
//
// std::copy(reinterpret_cast<char*>(&fhead), reinterpret_cast<char*>(&fhead + 1), retval.begin());
// std::copy(reinterpret_cast<char*>(&ihead), reinterpret_cast<char*>(&ihead + 1), retval.begin() + sizeof(bmp::FileHeader));
//
// const std::array<char, 6> pixels {
// static_cast<char>(0xf1),
// static_cast<char>(0x96),
// static_cast<char>(0x96),
// static_cast<char>(0x17),
// static_cast<char>(0xc8),
// static_cast<char>(0xc6)
// };
// for (int32_t y = 0; y < h; ++y) {
// for (int32_t x = 0; x < w; ++x) {
// retval[copy_offs + x * 3 + 0] = pixels[(x bitand 1 xor inv) * 3 + 0];
// retval[copy_offs + x * 3 + 1] = pixels[(x bitand 1 xor inv) * 3 + 1];
// retval[copy_offs + x * 3 + 2] = pixels[(x bitand 1 xor inv) * 3 + 2];
// }
// copy_offs += scanline_size;
// }
//
// return retval;
// }
} //unnamed namespace
int main() {
nana::form frm;