Skip to content

Commit

Permalink
Merge pull request #26 from Windower/feature/build-issues-fix
Browse files Browse the repository at this point in the history
Fixed build issues with VS 17.5.3
  • Loading branch information
z16 committed Mar 23, 2023
2 parents 85f448d + a87c419 commit 2a04fb4
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion core/src/hooks/imm32.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ std::vector<unsigned char> process_attributes(
}
c = 0xFFFD;
}
auto count = windower::to_sjis_string(std::wstring_view{&c, 1}).size();
auto const count =
windower::to_sjis_string(std::wstring_view{&c, 1}).size();
auto attr = gsl::at(attr_buffer, attr_index++);
for (std::size_t n = 0; n < count; ++n)
{
Expand Down
2 changes: 1 addition & 1 deletion core/src/ui/bitmap.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ color bitmap::sample(context& ctx, vector const& coordinate) const noexcept
auto const buffer = std::as_writable_bytes(std::span{data});
void* const buffer_ptr = buffer.data();
auto const buffer_bytes = static_cast<::BYTE*>(buffer_ptr);
::WICRect rect{
::WICRect const rect{
.X = gsl::narrow_cast<::INT>(x),
.Y = gsl::narrow_cast<::INT>(y),
.Width = 2,
Expand Down
2 changes: 1 addition & 1 deletion core/src/ui/commands.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void set_clip_command::execute(::IDirect3DDevice8* d3d_device) const noexcept
{
Expects(d3d_device != nullptr);

::D3DVIEWPORT8 viewport{m_x, m_y, m_width, m_height, 0.f, 1.f};
::D3DVIEWPORT8 const viewport{m_x, m_y, m_width, m_height, 0.f, 1.f};
d3d_device->SetViewport(&viewport);
}

Expand Down
1 change: 1 addition & 0 deletions core/src/ui/data_buffer.hpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef WINDOWER_UI_DATA_BUFFER_HPP
#define WINDOWER_UI_DATA_BUFFER_HPP

#include "ui/commands.hpp"
#include "ui/command_buffer.hpp"
#include "ui/data_buffer_traits.hpp"

Expand Down
2 changes: 1 addition & 1 deletion core/src/ui/mouse.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void mouse::move(vector position) noexcept { m_position = position; }

void mouse::press(mouse_button button) noexcept
{
auto point = ::POINT{
auto const point = ::POINT{
gsl::narrow_cast<::LONG>(m_position.x),
gsl::narrow_cast<::LONG>(m_position.y)};

Expand Down
2 changes: 1 addition & 1 deletion core/src/ui/text_rasterizer.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ texture text_rasterizer::rasterize(
texture_w, texture_h, ::GUID_WICPixelFormat32bppPBGRA,
::WICBitmapCacheOnDemand, bitmap_ptr.put());

::D2D1_RENDER_TARGET_PROPERTIES properties = {
::D2D1_RENDER_TARGET_PROPERTIES const properties = {
::D2D1_RENDER_TARGET_TYPE_DEFAULT,
{::DXGI_FORMAT_B8G8R8A8_UNORM, ::D2D1_ALPHA_MODE_PREMULTIPLIED},
96.f * scale.x,
Expand Down
6 changes: 3 additions & 3 deletions core/src/utility.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ void set_thread_name_seh(windower::zstring_view name)
{
__try
{
threadname_info info{.szName = name.c_str()};
threadname_info const info{.szName = name.c_str()};
::RaiseException(
MS_VC_EXCEPTION, 0, sizeof info / sizeof(::ULONG_PTR),
reinterpret_cast<::ULONG_PTR*>(&info));
reinterpret_cast<::ULONG_PTR const*>(&info));
}
__except (
::GetExceptionCode() == MS_VC_EXCEPTION ? EXCEPTION_EXECUTE_HANDLER
Expand All @@ -219,7 +219,7 @@ void windower::set_thread_name(u8zstring_view name)
kernel32.get_function<decltype(::SetThreadDescription)>(
u8"SetThreadDescription"))
{
auto result = SetThreadDescription(
auto const result = SetThreadDescription(
::GetCurrentThread(), to_wstring(name).c_str());
if (SUCCEEDED(result))
{
Expand Down

0 comments on commit 2a04fb4

Please sign in to comment.