Fix some Codacy issues
parent
1874e848f8
commit
ab09cde351
|
@ -93,7 +93,7 @@ void Window::setCursorHand(bool hand) {
|
|||
}
|
||||
|
||||
void Window::scrollCallback(GLFWwindow* window, double xO, double yO) {
|
||||
auto w = static_cast<Window*>(glfwGetWindowUserPointer(window));
|
||||
// auto w = static_cast<Window*>(glfwGetWindowUserPointer(window));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -55,8 +55,8 @@ DebugGui::DebugGui(glm::vec2 bufferSize, ClientGame& defs) :
|
|||
}
|
||||
|
||||
void DebugGui::positionElements(glm::vec2 bufferSize) {
|
||||
auto bufferWidth = (int)bufferSize.x;
|
||||
auto bufferHeight = (int)bufferSize.y;
|
||||
auto bufferWidth = static_cast<int>(bufferSize.x);
|
||||
auto bufferHeight = static_cast<int>(bufferSize.y);
|
||||
|
||||
get<GuiText>("crosshairText")->setPos({bufferWidth / 2 + 22, bufferHeight / 2 - 7});
|
||||
get<GuiText>("dataText")->setPos({10, 10});
|
||||
|
@ -95,8 +95,6 @@ void DebugGui::update(Player& player, LocalWorld& world, ClientGame& defs, doubl
|
|||
}
|
||||
|
||||
{ //Top-left Data
|
||||
glm::vec3 footPos = glm::floor(player.getPos()) - glm::vec3(0, 0.02, 0);
|
||||
|
||||
unsigned int biomeID = world.getBiome(glm::floor(player.getPos()));
|
||||
std::string biome = defs.biomes.biomeFromId(biomeID).identifier;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ std::shared_ptr<GuiInventoryList> GuiInventoryList::fromSerialized(const LuaGuiE
|
|||
glm::ivec2 bounds, LocalInventoryRefs& refs) {
|
||||
|
||||
glm::vec2 pos = SerialGui::get<glm::vec2>(elem, "position", bounds);
|
||||
glm::vec2 offset = SerialGui::get<glm::vec2>(elem, "position_anchor");
|
||||
// glm::vec2 offset = SerialGui::get<glm::vec2>(elem, "position_anchor");
|
||||
// glm::vec2 size = SerialGui::deserializeToken<glm::vec2>(s.tokens, "size", bounds);
|
||||
glm::vec4 padding = SerialGui::get<glm::vec4>(elem, "padding", bounds);
|
||||
glm::vec2 slotspc = SerialGui::get<glm::vec2>(elem, "slot_spacing", bounds);
|
||||
|
@ -100,7 +100,7 @@ void GuiInventoryList::leftClick(bool down, glm::ivec2 pos) {
|
|||
|
||||
unsigned short index = slot.x + slot.y * list->getWidth();
|
||||
|
||||
if (index < 0 || index >= list->getLength()) return;
|
||||
if (index >= list->getLength()) return;
|
||||
|
||||
list->primaryInteract(*hand, index);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue