From d36e9d0b0da863429b1a72e5025977eddb8a0a5f Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 18 Dec 2017 21:47:30 -0500 Subject: [PATCH] Reintroduces cstring.h to a few files that previously got it implicitly. --- Machines/Atari2600/TIA.cpp | 4 +++- Machines/Electron/SoundGenerator.cpp | 4 +++- Machines/ZX8081/ZX8081.cpp | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Machines/Atari2600/TIA.cpp b/Machines/Atari2600/TIA.cpp index 4cc975c40..7f6a8146d 100644 --- a/Machines/Atari2600/TIA.cpp +++ b/Machines/Atari2600/TIA.cpp @@ -7,7 +7,9 @@ // #include "TIA.hpp" + #include +#include using namespace Atari2600; namespace { @@ -379,7 +381,7 @@ void TIA::output_for_cycles(int number_of_cycles) { if(!output_cursor) { if(line_end_function_) line_end_function_(collision_buffer_); - memset(collision_buffer_, 0, sizeof(collision_buffer_)); + std::memset(collision_buffer_, 0, sizeof(collision_buffer_)); ball_.motion_time %= 228; player_[0].motion_time %= 228; diff --git a/Machines/Electron/SoundGenerator.cpp b/Machines/Electron/SoundGenerator.cpp index 89971e801..9a8a7ada4 100644 --- a/Machines/Electron/SoundGenerator.cpp +++ b/Machines/Electron/SoundGenerator.cpp @@ -8,6 +8,8 @@ #include "SoundGenerator.hpp" +#include + using namespace Electron; SoundGenerator::SoundGenerator(Concurrency::DeferringAsyncTaskQueue &audio_queue) : @@ -21,7 +23,7 @@ void SoundGenerator::get_samples(std::size_t number_of_samples, int16_t *target) counter_ = (counter_ + 1) % ((divider_+1) * 2); } } else { - memset(target, 0, sizeof(int16_t) * number_of_samples); + std::memset(target, 0, sizeof(int16_t) * number_of_samples); } } diff --git a/Machines/ZX8081/ZX8081.cpp b/Machines/ZX8081/ZX8081.cpp index 680f50fa0..8f8674c43 100644 --- a/Machines/ZX8081/ZX8081.cpp +++ b/Machines/ZX8081/ZX8081.cpp @@ -22,6 +22,7 @@ #include "Video.hpp" #include +#include #include #include