Cleanup of some warnings, updating modification dates, using nullptr instead of NULL in some cases.
--- a/src/in_2sf/XSFConfig_2SF.cpp
+++ b/src/in_2sf/XSFConfig_2SF.cpp
@@ -1,7 +1,7 @@
/*
* xSF - 2SF configuration
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-30
*
* Partially based on the vio*sf framework
*/
@@ -119,7 +119,7 @@
this->mutes[x] = !!SendMessageW(GetDlgItem(hwndDlg, idMutes), LB_GETSEL, x, 0);
}
-void XSFConfig_2SF::CopySpecificConfigToMemory(XSFPlayer *xSFPlayer, bool preLoad)
+void XSFConfig_2SF::CopySpecificConfigToMemory(XSFPlayer *, bool preLoad)
{
if (!preLoad)
{
--- a/src/in_2sf/XSFPlayer_2SF.cpp
+++ b/src/in_2sf/XSFPlayer_2SF.cpp
@@ -1,7 +1,7 @@
/*
* xSF - 2SF Player
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-30
*
* Based on a modified vio2sf v0.22c
*
@@ -196,7 +196,7 @@
/* Read ARM7 cpu registers */
//load_getu32(&NDS_ARM7.proc_ID, 1);
- load_getu32(NULL, 1);
+ load_getu32(nullptr, 1);
load_getu32(&NDS_ARM7.instruction, 1);
load_getu32(&NDS_ARM7.instruct_adr, 1);
load_getu32(&NDS_ARM7.next_instruction, 1);
@@ -231,18 +231,18 @@
bool tmpbool;
//load_getbool(&NDS_ARM7.wIRQ, 1);
//loaderwork.stateptr += 4;
- load_getbool(NULL, 1);
+ load_getbool(nullptr, 1);
//load_getbool(&NDS_ARM7.halt_IE_and_IF, 1);
//load_getbool(&NDS_ARM7.wirq, 1);
//loaderwork.stateptr += 4;
- //load_getbool(NULL, 1);
+ //load_getbool(nullptr, 1);
//load_getbool(&NDS_ARM7.intrWaitARM_state, 1);
load_getbool(&tmpbool, 1);
//NDS_ARM7.intrWaitARM_state = tmpbool;
/* Read ARM9 cpu registers */
//load_getu32(&NDS_ARM9.proc_ID, 1);
- load_getu32(NULL, 1);
+ load_getu32(nullptr, 1);
load_getu32(&NDS_ARM9.instruction, 1);
load_getu32(&NDS_ARM9.instruct_adr, 1);
load_getu32(&NDS_ARM9.next_instruction, 1);
@@ -276,11 +276,11 @@
load_getbool(&NDS_ARM9.waitIRQ, 1);
//load_getbool(&NDS_ARM9.wIRQ, 1);
//loaderwork.stateptr += 4;
- load_getbool(NULL, 1);
+ load_getbool(nullptr, 1);
//load_getbool(&NDS_ARM9.halt_IE_and_IF, 1);
//load_getbool(&NDS_ARM9.wirq, 1);
//loaderwork.stateptr += 4;
- //load_getbool(NULL, 1);
+ //load_getbool(nullptr, 1);
//load_getbool(&NDS_ARM9.intrWaitARM_state, 1);
load_getbool(&tmpbool, 1);
//NDS_ARM9.intrWaitARM_state = tmpbool;
@@ -288,9 +288,9 @@
/* Read in other internal variables that are important */
//int32_t tmps32;
//load_gets32(&nds.ARM9Cycle, 1);
- load_gets32(NULL, 1);
+ load_gets32(nullptr, 1);
//load_gets32(&nds.ARM7Cycle, 1);
- load_gets32(NULL, 1);
+ load_gets32(nullptr, 1);
load_gets32(&nds.cycles, 1);
int32_t tmps32_array[4];
//load_getu64(nds.timerCycle[0], 4);
@@ -304,33 +304,33 @@
//bool tmpbool_array[4];
//load_getbool(nds.timerOver[0], 4);
//loaderwork.stateptr += 16;
- load_getbool(NULL, 4);
+ load_getbool(nullptr, 4);
//load_getbool(nds.timerOver[1], 4);
//loaderwork.stateptr += 16;
- load_getbool(NULL, 4);
+ load_getbool(nullptr, 4);
//load_gets32(&nds.nextHBlank, 1);
//loaderwork.stateptr += 4;
- load_gets32(NULL, 1);
+ load_gets32(nullptr, 1);
load_getu32(&nds.VCount, 1);
load_getu32(&nds.old, 1);
//load_gets32(&nds.diff, 1);
//loaderwork.stateptr += 4;
- load_gets32(NULL, 1);
+ load_gets32(nullptr, 1);
//load_getbool(&nds.lignerendu, 1);
//loaderwork.stateptr += 4;
- load_getbool(NULL, 1);
- load_getu16(NULL, 1);
- load_getu16(NULL, 1);
+ load_getbool(nullptr, 1);
+ load_getu16(nullptr, 1);
+ load_getu16(nullptr, 1);
/* Read in memory/registers specific to the ARM9 */
//load_getu8 (MMU.ARM9_ITCM, 0x8000);
- load_getu8(NULL, 0x8000);
+ load_getu8(nullptr, 0x8000);
load_getu8 (MMU.ARM9_DTCM, 0x4000);
//load_getu8 (MMU.MAIN_MEM, 0x1000000);
//load_getu8(MMU.MAIN_MEM, 0x800000);
- //load_getu8(NULL, 0x800000);
- //load_getu8(NULL, 0x1000000);
- load_getu8(NULL, 0xFF8000);
+ //load_getu8(nullptr, 0x800000);
+ //load_getu8(nullptr, 0x1000000);
+ load_getu8(nullptr, 0xFF8000);
load_getu8(MMU.ARM9_ITCM, 0x8000);
load_getu8 (MMU.MAIN_MEM/*+0x400000*/, 0x400000);
load_getu8 (MMU.ARM9_REG, 0x10000);
@@ -339,19 +339,19 @@
//uint8_t tmpu8_ABG[0x80000];
//load_getu8 (ARM9Mem.ARM9_ABG, 0x80000);
//loaderwork.stateptr += 0x80000;
- load_getu8(NULL, 0x80000);
+ load_getu8(nullptr, 0x80000);
//uint8_t tmpu8_BBG[0x20000];
//load_getu8 (ARM9Mem.ARM9_BBG, 0x20000);
//loaderwork.stateptr += 0x20000;
- load_getu8(NULL, 0x20000);
+ load_getu8(nullptr, 0x20000);
//uint8_t tmpu8_AOBJ[0x40000];
//load_getu8 (ARM9Mem.ARM9_AOBJ, 0x40000);
//loaderwork.stateptr += 0x40000;
- load_getu8(NULL, 0x40000);
+ load_getu8(nullptr, 0x40000);
//uint8_t tmpu8_BOBJ[0x20000];
//load_getu8 (ARM9Mem.ARM9_BOBJ, 0x20000);
//loaderwork.stateptr += 0x20000;
- load_getu8(NULL, 0x20000);
+ load_getu8(nullptr, 0x20000);
load_getu8 (MMU.ARM9_LCD, 0xA4000);
//loaderwork.stateptr += 12;
@@ -422,14 +422,14 @@
SNDIFMuteAudio,
SNDIFUnMuteAudio,
SNDIFSetVolume,
- NULL
+ nullptr
};
SoundInterface_struct *SNDCoreList[] =
{
&SNDIF_2SF,
&SNDDummy,
- NULL
+ nullptr
};
static void Map2SFSection(const std::vector<uint8_t> §ion, bool isSave)
--- a/src/in_2sf/desmume/MMU.cpp
+++ b/src/in_2sf/desmume/MMU.cpp
@@ -1985,7 +1985,7 @@
//determine how we're going to copy
bool bogarted = false;
uint32_t sz = (bitWidth==EDMABitWidth_16)?2:4;
- uint32_t dstinc = 0,srcinc;
+ uint32_t dstinc = 0,srcinc = 0;
switch(dar) {
case EDMADestinationUpdate_Increment : dstinc = sz; break;
case EDMADestinationUpdate_Decrement : dstinc = (uint32_t)-(int32_t)sz; break;
--- a/src/in_2sf/desmume/SPU.cpp
+++ b/src/in_2sf/desmume/SPU.cpp
@@ -1041,7 +1041,7 @@
{
if(CHANNELS != -1)
{
- int32_t data;
+ int32_t data = 0;
switch(FORMAT)
{
case 0: Fetch8BitData<INTERPOLATE_MODE>(chan, &data); break;
--- a/src/in_2sf/desmume/metaspu/SndOut.cpp
+++ b/src/in_2sf/desmume/metaspu/SndOut.cpp
@@ -18,7 +18,7 @@
#include <cassert>
//#include "Global.h"
-#include "types.h"
+#include "../types.h"
#include "SndOut.h"
//----------------
--- a/src/in_2sf/desmume/metaspu/SoundTouch/ConfigSoundtouch.cpp
+++ b/src/in_2sf/desmume/metaspu/SoundTouch/ConfigSoundtouch.cpp
@@ -18,7 +18,7 @@
//TODO - need to make a generic way for saving these configs and add in the windows
//rc configurator
-#include "types.h"
+#include "../../types.h"
//#include "Global.h"
#include "Dialogs.h"
--- a/src/in_2sf/desmume/metaspu/Timestretcher.cpp
+++ b/src/in_2sf/desmume/metaspu/Timestretcher.cpp
@@ -18,7 +18,7 @@
#include "XSFCommon.h"
//#include "Global.h"
-#include "types.h"
+#include "../types.h"
#include "SoundTouch/SoundTouch.h"
#include "SndOut.h"
//#include "SoundTouch/WavFile.h"
--- a/src/in_2sf/desmume/metaspu/metaspu.cpp
+++ b/src/in_2sf/desmume/metaspu/metaspu.cpp
@@ -21,7 +21,7 @@
#include <vector>
#include <cassert>
-#include "types.h"
+#include "../types.h"
#include "metaspu.h"
//for pcsx2 method
--- a/src/in_2sf/desmume/saves.cpp
+++ b/src/in_2sf/desmume/saves.cpp
@@ -403,8 +403,8 @@
if(version == 0 || version == 1)
{
- uint32_t bupmem_size;
- uint32_t addr_size;
+ uint32_t bupmem_size = 0;
+ uint32_t addr_size = 0xFFFFFFFF;
if(version == 0)
{
--- a/src/in_gsf/XSFConfig_GSF.cpp
+++ b/src/in_gsf/XSFConfig_GSF.cpp
@@ -1,7 +1,7 @@
/*
* xSF - GSF configuration
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-30
*
* Partially based on the vio*sf framework
*/
@@ -129,7 +129,7 @@
this->mutes[x] = !!SendMessageW(GetDlgItem(hwndDlg, idMutes), LB_GETSEL, x, 0);
}
-void XSFConfig_GSF::CopySpecificConfigToMemory(XSFPlayer *xSFPlayer, bool preLoad)
+void XSFConfig_GSF::CopySpecificConfigToMemory(XSFPlayer *, bool preLoad)
{
if (!preLoad)
{
--- a/src/in_gsf/XSFPlayer_GSF.cpp
+++ b/src/in_gsf/XSFPlayer_GSF.cpp
@@ -1,7 +1,7 @@
/*
* xSF - GSF Player
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-30
*
* Based on a modified viogsf v0.08
*
@@ -106,7 +106,7 @@
}
}
- void setThrottle(unsigned short throttle)
+ void setThrottle(unsigned short)
{
}
};
@@ -207,14 +207,14 @@
cpuIsMultiBoot = (loaderwork.entry >> 24) == 2;
- CPULoadRom(NULL);
+ CPULoadRom(nullptr);
soundSetSampleRate(this->sampleRate);
soundInit();
soundReset();
soundSetEnable(0x3FF);
- CPUInit(NULL, false);
+ CPUInit(nullptr, false);
CPUReset();
return XSFPlayer::Load();
--- a/src/in_gsf/vbam/gba/GBA.cpp
+++ b/src/in_gsf/vbam/gba/GBA.cpp
@@ -1353,7 +1353,7 @@
return 0;
}
- u8 *whereToLoad = cpuIsMultiBoot ? workRAM : rom;
+ //u8 *whereToLoad = cpuIsMultiBoot ? workRAM : rom;
#ifndef NO_DEBUGGER
if(CPUIsELF(szFile)) {
@@ -3575,7 +3575,7 @@
if(count == 60) {
u32 time = /*systemGetClock()*/0;
if(time != lastTime) {
- u32 t = 100000/(time - lastTime);
+ //u32 t = 100000/(time - lastTime);
//systemShowSpeed(t);
} else
//systemShowSpeed(0);
--- a/src/in_ncsf/SSEQPlayer/Channel.cpp
+++ b/src/in_ncsf/SSEQPlayer/Channel.cpp
@@ -1,7 +1,7 @@
/*
* SSEQ Player - Channel structures
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-30
*
* Adapted from source code of FeOS Sound System
* By fincs
@@ -18,7 +18,7 @@
#include "common.h"
NDSSoundRegister::NDSSoundRegister() : volumeMul(0), volumeDiv(0), panning(0), waveDuty(0), repeatMode(0), format(0), enable(false),
- source(NULL), timer(0), psgX(0), psgLast(0), psgLastCount(0), samplePosition(0), sampleIncrease(0), loopStart(0), length(0)
+ source(nullptr), timer(0), psgX(0), psgLast(0), psgLastCount(0), samplePosition(0), sampleIncrease(0), loopStart(0), length(0)
{
}
@@ -39,13 +39,13 @@
this->enable = (reg >> 31) & 0x01;
}
-TempSndReg::TempSndReg() : CR(0), SOURCE(NULL), TIMER(0), REPEAT_POINT(0), LENGTH(0)
+TempSndReg::TempSndReg() : CR(0), SOURCE(nullptr), TIMER(0), REPEAT_POINT(0), LENGTH(0)
{
}
Channel::Channel() : chnId(-1), tempReg(), state(CS_NONE), trackId(-1), prio(0), manualSweep(false), flags(), pan(0), extAmpl(0), velocity(0), extPan(0),
key(0), ampl(0), extTune(0), orgKey(0), modType(0), modSpeed(0), modDepth(0), modRange(0), modDelay(0), modDelayCnt(0), modCounter(0),
- sweepLen(0), sweepCnt(0), sweepPitch(0), attackLvl(0), sustainLvl(0x7F), decayRate(0), releaseRate(0xFFFF), noteLength(-1), vol(0), ply(NULL), reg()
+ sweepLen(0), sweepCnt(0), sweepPitch(0), attackLvl(0), sustainLvl(0x7F), decayRate(0), releaseRate(0xFFFF), noteLength(-1), vol(0), ply(nullptr), reg()
{
}
--- a/src/in_ncsf/SSEQPlayer/Player.cpp
+++ b/src/in_ncsf/SSEQPlayer/Player.cpp
@@ -1,7 +1,7 @@
/*
* SSEQ Player - Player structure
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-30
*
* Adapted from source code of FeOS Sound System
* By fincs
@@ -11,7 +11,7 @@
#include "Player.h"
#include "common.h"
-Player::Player() : prio(0), nTracks(0), tempo(0), tempoCount(0), tempoRate(0), masterVol(0), sseq(NULL), sampleRate(0), interpolation(INTERPOLATION_NONE)
+Player::Player() : prio(0), nTracks(0), tempo(0), tempoCount(0), tempoRate(0), masterVol(0), sseq(nullptr), sampleRate(0), interpolation(INTERPOLATION_NONE)
{
memset(this->trackIds, 0, sizeof(this->trackIds));
for (size_t i = 0; i < 16; ++i)
@@ -25,7 +25,7 @@
int firstTrack = this->TrackAlloc();
if (firstTrack == -1)
return false;
- this->tracks[firstTrack].Init(firstTrack, this, NULL, 0);
+ this->tracks[firstTrack].Init(firstTrack, this, nullptr, 0);
this->nTracks = 1;
this->trackIds[0] = firstTrack;
--- a/src/in_ncsf/SSEQPlayer/SDAT.h
+++ b/src/in_ncsf/SSEQPlayer/SDAT.h
@@ -1,7 +1,7 @@
/*
* SSEQ Player - SDAT structure
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-21
+ * Last modification on 2013-03-30
*
* Nintendo DS Nitro Composer (SDAT) Specification document found at
* http://www.feshrine.net/hacking/doc/nds-sdat.html
--- a/src/in_ncsf/SSEQPlayer/SSEQ.cpp
+++ b/src/in_ncsf/SSEQPlayer/SSEQ.cpp
@@ -1,7 +1,7 @@
/*
* SSEQ Player - SDAT SSEQ (Sequence) structure
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-21
+ * Last modification on 2013-03-30
*
* Nintendo DS Nitro Composer (SDAT) Specification document found at
* http://www.feshrine.net/hacking/doc/nds-sdat.html
@@ -10,7 +10,7 @@
#include "SSEQ.h"
#include "NDSStdHeader.h"
-SSEQ::SSEQ(const std::string &fn) : filename(fn), data(), bank(NULL), info()
+SSEQ::SSEQ(const std::string &fn) : filename(fn), data(), bank(nullptr), info()
{
}
--- a/src/in_ncsf/SSEQPlayer/Track.cpp
+++ b/src/in_ncsf/SSEQPlayer/Track.cpp
@@ -1,7 +1,7 @@
/*
* SSEQ Player - Track structure
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-30
*
* Adapted from source code of FeOS Sound System
* By fincs
@@ -32,9 +32,9 @@
this->state.reset();
this->num = this->prio = 0;
- this->ply = NULL;
-
- this->startPos = this->pos = NULL;
+ this->ply = nullptr;
+
+ this->startPos = this->pos = nullptr;
memset(this->stack, 0, sizeof(this->stack));
this->stackPos = 0;
memset(this->loopCount, 0, sizeof(this->loopCount));
@@ -94,11 +94,11 @@
return -1;
bool bIsPCM = true;
- Channel *chn;
- int nCh;
+ Channel *chn = nullptr;
+ int nCh = -1;
auto &instrument = sbnk->instruments[this->patch];
- const SBNKInstrumentRange *noteDef = NULL;
+ const SBNKInstrumentRange *noteDef = nullptr;
int fRecord = instrument.record;
if (fRecord == 16)
@@ -208,7 +208,7 @@
{
// Find an existing note
int i;
- Channel *chn;
+ Channel *chn = nullptr;
for (i = 0; i < 16; ++i)
{
chn = &this->ply->channels[i];
--- a/src/in_ncsf/SSEQPlayer/common.h
+++ b/src/in_ncsf/SSEQPlayer/common.h
@@ -1,7 +1,7 @@
/*
* SSEQ Player - Common functions
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-3
*
* Some code from FeOS Sound System
* By fincs
@@ -25,7 +25,7 @@
std::vector<uint8_t> *data;
uint32_t pos;
- PseudoFile() : data(NULL), pos(0)
+ PseudoFile() : data(nullptr), pos(0)
{
}
--- a/src/in_ncsf/XSFPlayer_NCSF.cpp
+++ b/src/in_ncsf/XSFPlayer_NCSF.cpp
@@ -1,7 +1,7 @@
/*
* xSF - NCSF Player
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-30
*
* Partially based on the vio*sf framework
*
--- a/src/in_ncsf/XSFPlayer_NCSF.h
+++ b/src/in_ncsf/XSFPlayer_NCSF.h
@@ -1,7 +1,7 @@
/*
* xSF - NCSF Player
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-21
+ * Last modification on 2013-03-30
*
* Partially based on the vio*sf framework
*
--- a/src/in_snsf/XSFPlayer_SNSF.cpp
+++ b/src/in_snsf/XSFPlayer_SNSF.cpp
@@ -1,7 +1,7 @@
/*
* xSF - SNSF Player
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-30
*
* Based on a modified in_snsf by Caitsith2
* http://snsf.caitsith2.net/
--- a/src/in_snsf/snes9x/apu/apu.cpp
+++ b/src/in_snsf/snes9x/apu/apu.cpp
@@ -177,7 +177,6 @@
#include <math.h>
-#include "snes9x.h"
#include "apu.h"
//#include "snapshot.h"
//#include "display.h"
--- a/src/in_snsf/snes9x/apu/apu.h
+++ b/src/in_snsf/snes9x/apu/apu.h
@@ -179,7 +179,7 @@
#ifndef _APU_H_
#define _APU_H_
-#include "snes9x.h"
+#include "../snes9x.h"
#include "SNES_SPC.h"
typedef void (*apu_callback) (void *);
--- a/src/in_snsf/snes9x/apu/linear_resampler.h
+++ b/src/in_snsf/snes9x/apu/linear_resampler.h
@@ -4,7 +4,7 @@
#define __LINEAR_RESAMPLER_H
#include "resampler.h"
-#include "snes9x.h"
+#include "../snes9x.h"
static const int f_prec = 15;
static const uint32_t f__one = (1 << f_prec);
--- a/src/in_snsf/snes9x/memmap.cpp
+++ b/src/in_snsf/snes9x/memmap.cpp
@@ -2506,8 +2506,8 @@
Checksum_Calculate();
- bool isChecksumOK = (ROMChecksum + ROMComplementChecksum == 0xffff) &
- (ROMChecksum == CalculatedChecksum);
+ /*bool isChecksumOK = (ROMChecksum + ROMComplementChecksum == 0xffff) &
+ (ROMChecksum == CalculatedChecksum);*/
//// Build more ROM information
--- a/src/in_xsf_framework/DialogBuilder.cpp
+++ b/src/in_xsf_framework/DialogBuilder.cpp
@@ -1,7 +1,7 @@
/*
* Windows Dynamic Dialog Builder framework
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-30
*/
#include "DialogBuilder.h"
--- a/src/in_xsf_framework/DialogBuilder.h
+++ b/src/in_xsf_framework/DialogBuilder.h
@@ -1,7 +1,7 @@
/*
* Windows Dynamic Dialog Builder framework
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-30
*/
#ifndef DIALOG_BUILDER_H
@@ -400,7 +400,7 @@
friend class DialogTemplate;
DialogControl() : controlType(NO_CONTROL), style(0), exstyle(0), rect(), id(-1), relativePosition() { }
DialogControl(const DialogControl &control) : controlType(control.controlType), style(control.style), exstyle(control.exstyle), rect(control.rect), id(control.id),
- relativePosition(control.relativePosition.get() ? control.relativePosition->Clone() : NULL) { }
+ relativePosition(control.relativePosition.get() ? control.relativePosition->Clone() : nullptr) { }
DialogControl &operator=(const DialogControl &control)
{
this->controlType = control.controlType;
--- a/src/in_xsf_framework/UTFEncodeDecode.h
+++ b/src/in_xsf_framework/UTFEncodeDecode.h
@@ -50,7 +50,7 @@
const ct_in *ipc = &in[0];
do
{
- ct_out *opc = NULL;
+ ct_out *opc = nullptr;
result = this->cv(facet, state, ipc, &in[0] + in.length(), ipc, buf, buf + buf_size, opc);
os << std::basic_string<ct_out>(buf, opc - buf);
} while (ipc < &in[0] + in.length() && result != codecvt_facet::error);
--- a/src/in_xsf_framework/XSFConfig.cpp
+++ b/src/in_xsf_framework/XSFConfig.cpp
@@ -1,7 +1,7 @@
/*
* xSF - Core configuration handler
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-30
*
* Partially based on the vio*sf framework
*/
@@ -174,7 +174,7 @@
INT_PTR CALLBACK XSFConfig::ConfigDialogProcStatic(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- XSFConfig *thisPtr = NULL;
+ XSFConfig *thisPtr = nullptr;
if (uMsg == WM_INITDIALOG)
{
@@ -193,7 +193,7 @@
INT_PTR CALLBACK XSFConfig::InfoDialogProcStatic(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- XSFConfig *thisPtr = NULL;
+ XSFConfig *thisPtr = nullptr;
if (uMsg == WM_INITDIALOG)
{
@@ -210,7 +210,7 @@
return false;
}
-INT_PTR CALLBACK XSFConfig::ConfigDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK XSFConfig::ConfigDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM)
{
switch (uMsg)
{
@@ -269,7 +269,7 @@
extern XSFFile *xSFFileInInfo;
-INT_PTR CALLBACK XSFConfig::InfoDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK XSFConfig::InfoDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM)
{
switch (uMsg)
{
--- a/src/in_xsf_framework/XSFConfig.h
+++ b/src/in_xsf_framework/XSFConfig.h
@@ -1,7 +1,7 @@
/*
* xSF - Core configuration handler
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-30
*
* Partially based on the vio*sf framework
*/
--- a/src/in_xsf_framework/XSFConfig_Winamp.cpp
+++ b/src/in_xsf_framework/XSFConfig_Winamp.cpp
@@ -1,7 +1,7 @@
/*
* xSF - Winamp-specification configuration handler
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-21
+ * Last modification on 2013-03-30
*
* Partially based on the vio*sf framework
*/
@@ -42,7 +42,7 @@
do
{
executablePath.resize(executablePath.size() * 2);
- result = GetModuleFileNameW(NULL, &executablePath[0], executablePath.size());
+ result = GetModuleFileNameW(nullptr, &executablePath[0], executablePath.size());
} while (result == executablePath.size());
if (!result)
--- a/src/in_xsf_framework/XSFFile.cpp
+++ b/src/in_xsf_framework/XSFFile.cpp
@@ -1,7 +1,7 @@
/*
* xSF - File structure
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-30
*
* Partially based on the vio*sf framework
*/
--- a/src/in_xsf_framework/XSFPlayer.cpp
+++ b/src/in_xsf_framework/XSFPlayer.cpp
@@ -1,7 +1,7 @@
/*
* xSF - Core Player
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-21
+ * Last modification on 2013-03-30
*
* Partially based on the vio*sf framework
*/
@@ -13,7 +13,7 @@
extern XSFConfig *xSFConfig;
-XSFPlayer::XSFPlayer() : xSF(NULL), sampleRate(0), detectedSilenceSample(0), detectedSilenceSec(0), skipSilenceOnStartSec(5), lengthSample(0), fadeSample(0), currentSample(0),
+XSFPlayer::XSFPlayer() : xSF(nullptr), sampleRate(0), detectedSilenceSample(0), detectedSilenceSec(0), skipSilenceOnStartSec(5), lengthSample(0), fadeSample(0), currentSample(0),
prevSampleL(XSFPlayer::CHECK_SILENCE_BIAS), prevSampleR(XSFPlayer::CHECK_SILENCE_BIAS), lengthInMS(-1), fadeInMS(-1), volume(1.0), ignoreVolume(false)
{
}
--- a/src/in_xsf_framework/convert.h
+++ b/src/in_xsf_framework/convert.h
@@ -1,7 +1,7 @@
/*
* Common conversion functions
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-28
+ * Last modification on 2013-03-30
*/
#ifndef _CONVERT_H_
--- a/src/in_xsf_framework/eqstr.h
+++ b/src/in_xsf_framework/eqstr.h
@@ -1,6 +1,6 @@
/*
* Case-insensitive string equality
- * Last modification on 2013-03-21
+ * Last modification on 2013-03-30
*
* Based on "How to do case-insensitive string comparison"
* By Matt Austern
--- a/src/in_xsf_framework/in_xsf.cpp
+++ b/src/in_xsf_framework/in_xsf.cpp
@@ -1,7 +1,7 @@
/*
* xSF - Winamp plugin
* By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
- * Last modification on 2013-03-25
+ * Last modification on 2013-03-30
*
* Partially based on the vio*sf framework
*/
@@ -13,10 +13,10 @@
#include <winamp/wa_ipc.h>
extern In_Module inMod;
-const XSFFile *xSFFile = NULL;
-XSFFile *xSFFileInInfo = NULL;
-XSFPlayer *xSFPlayer = NULL;
-XSFConfig *xSFConfig = NULL;
+const XSFFile *xSFFile = nullptr;
+XSFFile *xSFFileInInfo = nullptr;
+XSFPlayer *xSFPlayer = nullptr;
+XSFConfig *xSFConfig = nullptr;
bool paused;
int seek_needed;
double decode_pos_ms;
@@ -36,7 +36,7 @@
decode_pos_ms = seek_needed - (seek_needed % 1000);
seek_needed = -1;
auto dummyBuffer = std::vector<uint8_t>(576 * NumChannels * (BitsPerSample / 8));
- xSFPlayer->Seek(static_cast<unsigned>(decode_pos_ms), NULL, dummyBuffer, inMod.outMod);
+ xSFPlayer->Seek(static_cast<unsigned>(decode_pos_ms), nullptr, dummyBuffer, inMod.outMod);
}
if (done)
@@ -149,7 +149,7 @@
return INFOBOX_EDITED;
}
-int isOurFile(const in_char *fn)
+int isOurFile(const in_char *)
{
return 0;
}
@@ -178,7 +178,7 @@
xSFPlayer = tmpxSFPlayer.release();
killThread = false;
- thread_handle = CreateThread(NULL, 0, playThread, &killThread, 0, NULL);
+ thread_handle = CreateThread(nullptr, 0, playThread, &killThread, 0, nullptr);
return 0;
}
catch (const std::exception &)
@@ -220,8 +220,8 @@
inMod.outMod->Close();
inMod.SAVSADeInit();
delete xSFPlayer;
- xSFPlayer = NULL;
- xSFFile = NULL;
+ xSFPlayer = nullptr;
+ xSFFile = nullptr;
}
int getLength()
@@ -251,7 +251,7 @@
inMod.outMod->SetPan(pan);
}
-void eqSet(int on, char data[10], int preamp)
+void eqSet(int, char [10], int)
{
}
@@ -259,8 +259,8 @@
{
IN_VER,
const_cast<char *>(XSFPlayer::WinampDescription), /* Unsafe but Winamp's SDK requires this */
- NULL, /* Filled by Winamp */
- NULL, /* Filled by Winamp */
+ nullptr, /* Filled by Winamp */
+ nullptr, /* Filled by Winamp */
const_cast<char *>(XSFPlayer::WinampExts), /* Unsafe but Winamp's SDK requires this */
1,
IN_MODULE_FLAG_USES_OUTPUT_PLUGIN | IN_MODULE_FLAG_REPLAYGAIN,
@@ -281,11 +281,11 @@
setOutputTime,
setVolume,
setPan,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* Vis stuff, filled by Winamp */
- NULL, NULL, /* DSP stuff, filled by Winamp */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* Vis stuff, filled by Winamp */
+ nullptr, nullptr, /* DSP stuff, filled by Winamp */
eqSet,
- NULL, /* Filled by Winamp */
- NULL /* Filled by Winamp */
+ nullptr, /* Filled by Winamp */
+ nullptr /* Filled by Winamp */
};
extern "C" __declspec(dllexport) In_Module *winampGetInModule2()
@@ -393,7 +393,7 @@
return 1;
}
-extern "C" __declspec(dllexport) int winampClearExtendedFileInfoW(const wchar_t *fn)
+extern "C" __declspec(dllexport) int winampClearExtendedFileInfoW(const wchar_t *)
{
return 0;
}
@@ -438,7 +438,7 @@
if (extendedSeekNeeded != -1)
{
auto dummyBuffer = std::vector<uint8_t>(576 * NumChannels * (BitsPerSample / 8));
- if (tmpxSFPlayer->Seek(static_cast<unsigned>(extendedSeekNeeded), killswitch, dummyBuffer, NULL))
+ if (tmpxSFPlayer->Seek(static_cast<unsigned>(extendedSeekNeeded), killswitch, dummyBuffer, nullptr))
return 0;
extendedSeekNeeded = -1;
}
@@ -457,7 +457,7 @@
return copied;
}
-extern "C" __declspec(dllexport) int winampGetExtendedRead_setTime(intptr_t handle, int millisecs)
+extern "C" __declspec(dllexport) int winampGetExtendedRead_setTime(intptr_t, int millisecs)
{
extendedSeekNeeded = millisecs;
return 1;
--- a/src/in_xsf_framework/ltstr.h
+++ b/src/in_xsf_framework/ltstr.h
@@ -1,6 +1,6 @@
/*
* Case-insensitive string comparison
- * Last modification on 2012-03-21
+ * Last modification on 2012-03-30
*
* Based on "How to do case-insensitive string comparison"
* By Matt Austern