Fixing some clang warnings/errors.

This commit is contained in:
Ben Vanik
2015-07-15 23:26:58 -07:00
parent 74d2df2004
commit ecd4af10c9
27 changed files with 180 additions and 153 deletions

View File

@@ -28,7 +28,7 @@ class XAudio2AudioSystem : public AudioSystem {
void DestroyDriver(AudioDriver* driver) override;
protected:
virtual void Initialize();
void Initialize() override;
};
} // namespace xaudio2

View File

@@ -26,16 +26,7 @@ extern "C" {
namespace xe {
namespace apu {
XmaContext::XmaContext()
: id_(0),
guest_ptr_(0),
is_allocated_(false),
is_enabled_(false),
decoding_packet_(false),
codec_(nullptr),
context_(nullptr),
decoded_frame_(nullptr),
packet_(nullptr) {}
XmaContext::XmaContext() = default;
XmaContext::~XmaContext() {
if (context_) {

View File

@@ -175,24 +175,22 @@ class XmaContext {
Memory* memory_;
uint32_t id_;
uint32_t guest_ptr_;
uint32_t id_ = 0;
uint32_t guest_ptr_ = 0;
xe::mutex lock_;
bool is_allocated_;
bool is_enabled_;
bool decoding_packet_;
bool is_allocated_ = false;
bool is_enabled_ = false;
// libav structures
AVCodec* codec_;
AVCodecContext* context_;
AVFrame* decoded_frame_;
AVPacket* packet_;
AVCodec* codec_ = nullptr;
AVCodecContext* context_ = nullptr;
AVFrame* decoded_frame_ = nullptr;
AVPacket* packet_ = nullptr;
WmaProExtraData extra_data_;
size_t current_frame_pos_;
uint8_t* current_frame_;
uint32_t frame_samples_size_;
size_t current_frame_pos_ = 0;
uint8_t* current_frame_ = nullptr;
uint32_t frame_samples_size_ = 0;
uint8_t packet_data_[kBytesPerPacket];
};

View File

@@ -255,8 +255,6 @@ void XmaDecoder::WriteRegister(uint32_t addr, uint64_t value) {
context.Clear();
}
}
} else {
value = value;
}
}