1
0
mirror of synced 2024-11-14 10:37:40 +01:00

Fix compiler warnings

This commit is contained in:
Stepland 2020-03-03 00:09:12 +01:00
parent 4550c774f1
commit 5a4ad37fca
3 changed files with 7 additions and 7 deletions

View File

@ -90,7 +90,7 @@ subdir('test')
executable(
'jujube',
sources,
dependencies: [sfml, thread_dep, m_dep, gl_dep],
dependencies: [sfml, thread_dep, gl_dep, m_dep],
include_directories : include_directories('include', 'include/imgui', 'include/imgui-sfml'),
cpp_args : [
'-Wall',

View File

@ -36,8 +36,8 @@ namespace Data {
Button convert_memon_tail(Button note, unsigned int tail_position) {
auto note_position = button_to_index(note);
assert((note_position >= 0 and note_position <= 15));
assert((tail_position >= 0 and tail_position <= 11));
assert((note_position <= 15));
assert((tail_position <= 11));
int x = note_position%4;
int y = note_position/4;
int dx = 0;

View File

@ -10,24 +10,24 @@ namespace MusicSelect {
if (m_resources.m_preferences.options.marker == marker.m_metadata.name) {
selected_since.emplace();
}
};
}
void MarkerPanel::click(Ribbon&, const Data::Button&) {
if (not selected_since) {
selected_since.emplace();
m_resources.m_preferences.options.marker = m_marker.m_metadata.name;
}
};
}
void MarkerPanel::draw(sf::RenderTarget& target, sf::RenderStates states) const {
states.transform *= getTransform();
float animation_time = 0.f;
if (selected_since) {
animation_time = std::fmodf(selected_since->getElapsedTime().asSeconds(), 2.f) - 1.f;
animation_time = std::fmod(selected_since->getElapsedTime().asSeconds(), 2.f) - 1.f;
}
auto sprite = m_marker.get_sprite(Resources::MarkerAnimation::APPROACH, animation_time);
if (sprite) {
target.draw(*sprite, states);
}
};
}
}