Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
Signed-off-by: Karol Szuster <karolsz9898@gmail.com>
  • Loading branch information
Amaroq7 committed Mar 23, 2020
1 parent c4acbac commit cec02b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/CmdSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ Command *CommandMngr::registerCommand(ICommand::Type type,
return registerCommandInternal<ClientCommand>(cmd, info, flags, cb, data).get();
case ICommand::Type::Server:
return registerCommandInternal<ServerCommand>(cmd, info, cb, data).get();
default:
return nullptr;
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/MenuSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void Menu::display(IPlayer *player, std::uint32_t page, std::uint32_t time)
if (m_style == IMenu::Style::Item)
{
// format and show menu
std::int32_t keys = 0;
std::uint32_t keys = 0;

// cache this?
// cache to m_text if all items without callback
Expand Down Expand Up @@ -280,7 +280,7 @@ Menu::Item *Menu::keyToItem(std::uint32_t key) const

Menu::Item *Menu::appendItem(std::string_view name, Item::Callback callback, std::any cbData, std::any data)
{
return _addItem(-1, name, callback, cbData, data);
return _addItem(static_cast<std::uint32_t>(-1), name, callback, cbData, data);
}

Menu::Item *Menu::insertItem(std::size_t position,
Expand Down Expand Up @@ -451,7 +451,7 @@ void MenuMngr::clearMenus()
META_RES MenuMngr::ClientCommand(edict_t *pEntity)
{
std::string_view pressedKeyText(CMD_ARGV(1));
std::int32_t pressedKey;
std::uint32_t pressedKey;
if (const auto &[ptr, ec] =
std::from_chars(pressedKeyText.data(), pressedKeyText.data() + pressedKeyText.length(), pressedKey);
ec != std::errc())
Expand Down
2 changes: 2 additions & 0 deletions subprojects/sourcepawn/ExtMain.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include <unordered_map>
#include <array>
#include <vector>
#include <cstdarg>
#include <cmath>

#if defined SP_POSIX
#include <dlfcn.h>
Expand Down

0 comments on commit cec02b1

Please sign in to comment.