Fix some Codacy issues

master
Nicole Collings 2020-06-20 23:41:02 -07:00
parent 1874e848f8
commit ab09cde351
3 changed files with 5 additions and 7 deletions

View File

@ -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));
}

View File

@ -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;

View File

@ -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);
}