More clean-up
This commit is contained in:
@@ -7,9 +7,9 @@ namespace JabyEngine {
|
||||
namespace FileProcessor {
|
||||
namespace Helper {
|
||||
template<typename T>
|
||||
static Progress exchange_and_execute_process_function(State::GenericProcessRoutine<T> process_routine, State::Configuration& config, T& state) {
|
||||
config.process_routine = reinterpret_cast<State::ProcessRoutine>(process_routine);
|
||||
return process_routine(config, state);
|
||||
static Progress exchange_and_execute_process_function(State::GenericProcessRoutine<T> process_routine, State::CDDataProcessor& data_proc, T& state) {
|
||||
data_proc.process_routine = reinterpret_cast<State::ProcessRoutine>(process_routine);
|
||||
return process_routine(data_proc, state);
|
||||
}
|
||||
|
||||
namespace DMA {
|
||||
@@ -17,8 +17,8 @@ namespace JabyEngine {
|
||||
uint32_t words_to_use;
|
||||
bool is_last;
|
||||
|
||||
static constexpr WordsReady calculate(const State::Configuration& config, size_t words_left) {
|
||||
const auto config_data_words = (config.data_bytes/sizeof(uint32_t));
|
||||
static constexpr WordsReady calculate(const State::CDDataProcessor& data_proc, size_t words_left) {
|
||||
const auto config_data_words = (data_proc.data_bytes/sizeof(uint32_t));
|
||||
const auto words_to_use = (config_data_words > words_left) ? words_left : config_data_words;
|
||||
|
||||
return {
|
||||
|
Reference in New Issue
Block a user