<commit_before>/*
 * InputSystem.cpp
 *
 *  Created on: 15/07/2014
 *      Author: vitor
 */

#include "InputSystem.h"

void InputSystem::process_entities(std::map<uint64_t, EntityPtr>& entities,
		double dt) {
	SDL_Event event;
	while (SDL_PollEvent(&event)) {
		switch (event.type) {
		case SDL_QUIT:
			world_ptr->get_event_manager().broadcast<Quit>();
			break;
		case SDL_KEYDOWN:
			if (!event.key.repeat) {
				world_ptr->get_event_manager().broadcast<KeyboardDown>(
						event.key.keysym.scancode);
			}
			break;
		case SDL_KEYUP:
			if (!event.key.repeat) {
				world_ptr->get_event_manager().broadcast<KeyboardUp>(
						event.key.keysym.scancode);
			}
			break;
		default:
			break;
		}
	}
}

void InputSystem::process_entity(Entity& entity, double dt) {
}<commit_msg>Removed unnecessary repeat check for KEYUP.<commit_after>/*
 * InputSystem.cpp
 *
 *  Created on: 15/07/2014
 *      Author: vitor
 */

#include "InputSystem.h"

void InputSystem::process_entities(std::map<uint64_t, EntityPtr>& entities,
		double dt) {
	SDL_Event event;
	while (SDL_PollEvent(&event)) {
		switch (event.type) {
		case SDL_QUIT:
			world_ptr->get_event_manager().broadcast<Quit>();
			break;
		case SDL_KEYDOWN:
			if (!event.key.repeat) {
				world_ptr->get_event_manager().broadcast<KeyboardDown>(
						event.key.keysym.scancode);
			}
			break;
		case SDL_KEYUP:
			world_ptr->get_event_manager().broadcast<KeyboardUp>(
					event.key.keysym.scancode);
			break;
		default:
			break;
		}
	}
}

void InputSystem::process_entity(Entity& entity, double dt) {
}
{'fraction_non_alphanumeric': 0.13983322642719692, 'fraction_numerical': 0.012828736369467608, 'mean_word_length': 3.890282131661442, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5367167', 'n_tokens_mistral': 666, 'n_tokens_neox': 570, 'n_words': 95}