Skip to content

Commit

Permalink
Various build fixes and GSL adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
z16 committed Aug 24, 2024
1 parent 7a2946a commit 0971b5e
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/src/addon/modules/packet.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ windower::packet_result windower::trigger_packet(
lua::push(guard, result_data);
}
lua::push(guard, counter);
lua::push(guard, double(timestamp));
lua::push(guard, static_cast<double>(timestamp));
lua::push(guard, blocked);
lua::push(guard, injected_by);
lua::call(guard, 9, 2);
Expand Down
3 changes: 2 additions & 1 deletion core/src/addon/package_manager.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ windower::package_version::package_version(std::u8string_view value) :
package_version(to_string_view(value))
{}

windower::package_version::package_version(std::string_view value)
windower::package_version::package_version(std::string_view value) :
minor{}, revision{}, build{}
{
value.remove_prefix(parse(value, major));
if (!value.empty() && value.front() != u8'.')
Expand Down
Empty file modified core/src/addon/unsafe.cpp
100644 → 100755
Empty file.
Empty file modified core/src/addon/unsafe.hpp
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion core/src/binding_manager.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ void windower::binding_manager::unregister_device(
auto const device_id = it->second.id;
auto end = std::remove_if(
m_bindings.begin(), m_bindings.end(),
[device_id](auto const& b) { return b.device_mask[device_id]; });
[device_id](auto const& b) { return gsl::at(b.device_mask, device_id); });
m_bindings.erase(end, m_bindings.end());
m_descriptors.erase(it);
std::get<1>(gsl::at(m_devices, device_id)).clear();
Expand Down
2 changes: 1 addition & 1 deletion core/src/hooklib/trampoline.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ class windower::hooklib::trampoline::block
: std::bit_cast<std::uint8_t*>(callback)};
::InterlockedExchange16(
std::bit_cast<short*>(m_target),
short(x86::hotpatch_jump_instruction));
gsl::narrow_cast<short>(x86::hotpatch_jump_instruction));
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion core/src/hooks/advapi32.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ T convert(U value) noexcept
}

template<typename T>
T convert(float value) noexcept
constexpr T convert(float value) noexcept
{
return *std::bit_cast<T*>(&value);
}
Expand Down
Empty file modified core/src/hooks/kernel32.cpp
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions core/src/ui/text_layout_options.hpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#include <compare>
#include <cstdint>
#include <string>
#include <string_view>

namespace windower::ui
Expand Down
6 changes: 5 additions & 1 deletion fenestra.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ SOFTWARE.
<Rule Id="C26434" Action="None" />
<Rule Id="C26447" Action="None" />
<Rule Id="C26459" Action="None" />
<Rule Id="C26473" Action="None" />
<Rule Id="C26474" Action="None" />
<Rule Id="C26486" Action="None" />
<Rule Id="C26487" Action="None" />
<Rule Id="C26489" Action="None" />
<Rule Id="C26490" Action="None" />
<Rule Id="C26492" Action="None" />
<Rule Id="C26812" Action="None" />
<Rule Id="C26821" Action="None" />
</Rules>
</RuleSet>
</RuleSet>

0 comments on commit 0971b5e

Please sign in to comment.