From: <man...@us...> - 2014-02-23 19:53:11
|
Revision: 3763 http://sourceforge.net/p/modplug/code/3763 Author: manxorist Date: 2014-02-23 19:53:03 +0000 (Sun, 23 Feb 2014) Log Message: ----------- [Ref] Add -Wmissing-prototypes for clang builds and fix all resulting warnings. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/build/make/Makefile.config.clang trunk/OpenMPT/common/serialization_utils.cpp trunk/OpenMPT/common/serialization_utils.h trunk/OpenMPT/openmpt123/openmpt123.cpp trunk/OpenMPT/soundlib/Load_amf.cpp trunk/OpenMPT/soundlib/Load_dmf.cpp trunk/OpenMPT/soundlib/Load_it.cpp trunk/OpenMPT/soundlib/Load_mdl.cpp trunk/OpenMPT/soundlib/Load_okt.cpp trunk/OpenMPT/soundlib/Load_psm.cpp trunk/OpenMPT/soundlib/Load_xm.cpp trunk/OpenMPT/soundlib/MixerLoops.cpp trunk/OpenMPT/soundlib/MixerLoops.h trunk/OpenMPT/soundlib/SampleFormats.cpp trunk/OpenMPT/soundlib/SampleIO.cpp trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndfile.h trunk/OpenMPT/soundlib/load_j2b.cpp trunk/OpenMPT/soundlib/tuningcollection.h trunk/OpenMPT/test/test.cpp Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/Makefile 2014-02-23 19:53:03 UTC (rev 3763) @@ -229,8 +229,8 @@ endif endif -CXXFLAGS += -Wall -Wextra -Wcast-align -CFLAGS += -Wall -Wextra -Wcast-align +CXXFLAGS += -Wall -Wextra -Wcast-align $(CXXFLAGS_WARNINGS) +CFLAGS += -Wall -Wextra -Wcast-align $(CFLAGS_WARNINGS) ifeq ($(DYNLINK),1) LDFLAGS_RPATH += -Wl,-rpath,./bin Modified: trunk/OpenMPT/build/make/Makefile.config.clang =================================================================== --- trunk/OpenMPT/build/make/Makefile.config.clang 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/build/make/Makefile.config.clang 2014-02-23 19:53:03 UTC (rev 3763) @@ -12,4 +12,7 @@ LDLIBS += -lm ARFLAGS := rcs +CXXFLAGS_WARNINGS += -Wmissing-prototypes +CFLAGS_WARNINGS += -Wmissing-prototypes + EXESUFFIX= Modified: trunk/OpenMPT/common/serialization_utils.cpp =================================================================== --- trunk/OpenMPT/common/serialization_utils.cpp 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/common/serialization_utils.cpp 2014-02-23 19:53:03 UTC (rev 3763) @@ -20,18 +20,18 @@ static const uint8 HeaderId_FlagByte = 0; // Indexing starts from 0. -inline bool Testbit(uint8 val, uint8 bitindex) {return ((val & (1 << bitindex)) != 0);} +static inline bool Testbit(uint8 val, uint8 bitindex) {return ((val & (1 << bitindex)) != 0);} -inline void Setbit(uint8& val, uint8 bitindex, bool newval) -//---------------------------------------------------------- +static inline void Setbit(uint8& val, uint8 bitindex, bool newval) +//---------------------------------------------------------------- { if(newval) val |= (1 << bitindex); else val &= ~(1 << bitindex); } -bool IsPrintableId(const char* pId, const size_t nLength) -//-------------------------------------------------------- +static bool IsPrintableId(const char* pId, const size_t nLength) +//-------------------------------------------------------------- { for(size_t i = 0; i < nLength; i++) { @@ -42,8 +42,8 @@ } -uint8 GetByteReq1248(const uint64 size) -//------------------------------------- +static uint8 GetByteReq1248(const uint64 size) +//-------------------------------------------- { if((size >> 6) == 0) return 1; if((size >> (1*8+6)) == 0) return 2; @@ -52,8 +52,8 @@ } -uint8 GetByteReq1234(const uint32 num) -//------------------------------------ +static uint8 GetByteReq1234(const uint32 num) +//------------------------------------------- { if((num >> 6) == 0) return 1; if((num >> (1*8+6)) == 0) return 2; @@ -63,7 +63,7 @@ void WriteAdaptive12(std::ostream& oStrm, const uint16 num) -//------------------------------------------------------ +//--------------------------------------------------------- { if(num >> 7 == 0) Binarywrite<uint16>(oStrm, num << 1, 1); @@ -73,7 +73,7 @@ void WriteAdaptive1234(std::ostream& oStrm, const uint32 num) -//-------------------------------------------------------- +//----------------------------------------------------------- { const uint8 bc = GetByteReq1234(num); const uint32 sizeInstruction = (num << 2) | (bc - 1); @@ -82,8 +82,8 @@ //Format: First bit tells whether the size indicator is 1 or 2 bytes. -void WriteAdaptive12String(std::ostream& oStrm, const std::string& str) -//------------------------------------------------------------------ +static void WriteAdaptive12String(std::ostream& oStrm, const std::string& str) +//---------------------------------------------------------------------------- { uint16 s = static_cast<uint16>(str.size()); LimitMax(s, uint16(uint16_max / 2)); @@ -93,8 +93,8 @@ // Works only for arguments 1,2,4,8 -uint8 Log2(const uint8& val) -//-------------------------- +static uint8 Log2(const uint8& val) +//--------------------------------- { if(val == 1) return 0; else if(val == 2) return 1; @@ -102,8 +102,9 @@ else return 3; } + void WriteAdaptive1248(std::ostream& oStrm, const uint64& num) -//--------------------------------------------------------- +//------------------------------------------------------------ { const uint8 bc = GetByteReq1248(num); const uint64 sizeInstruction = (num << 2) | Log2(bc); @@ -112,7 +113,7 @@ void ReadAdaptive12(std::istream& iStrm, uint16& val) -//----------------------------------------------- +//--------------------------------------------------- { Binaryread<uint16>(iStrm, val, 1); if(val & 1) @@ -127,7 +128,7 @@ void ReadAdaptive1234(std::istream& iStrm, uint32& val) -//------------------------------------------------- +//----------------------------------------------------- { Binaryread<uint32>(iStrm, val, 1); const uint8 bc = 1 + static_cast<uint8>(val & 3); @@ -142,13 +143,15 @@ val >>= 2; } -const uint8 pow2xTable[] = {1, 2, 4, 8, 16, 32, 64, 128}; +static const uint8 pow2xTable[] = {1, 2, 4, 8, 16, 32, 64, 128}; + // Returns 2^n. n must be within {0,...,7}. -inline uint8 Pow2xSmall(const uint8& exp) {ASSERT(exp <= 7); return pow2xTable[exp];} +static inline uint8 Pow2xSmall(const uint8& exp) {ASSERT(exp <= 7); return pow2xTable[exp];} + void ReadAdaptive1248(std::istream& iStrm, uint64& val) -//------------------------------------------------- +//----------------------------------------------------- { Binaryread<uint64>(iStrm, val, 1); uint8 bc = Pow2xSmall(static_cast<uint8>(val & 3)); @@ -212,8 +215,8 @@ } -std::string IdToString(const char* const pvId, const size_t nLength) -//------------------------------------------------------------- +static std::string IdToString(const char* const pvId, const size_t nLength) +//------------------------------------------------------------------------- { const char* pId = static_cast<const char*>(pvId); if (nLength == 0) Modified: trunk/OpenMPT/common/serialization_utils.h =================================================================== --- trunk/OpenMPT/common/serialization_utils.h 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/common/serialization_utils.h 2014-02-23 19:53:03 UTC (rev 3763) @@ -67,10 +67,16 @@ SNW_INSUFFICIENT_DATASIZETYPE = (0x16) | SNT_FAILURE }; -bool IsPrintableId(const char* pvId, const size_t nLength); // Return true if given id is printable, false otherwise. + +void ReadAdaptive12(std::istream& iStrm, uint16& val); +void ReadAdaptive1234(std::istream& iStrm, uint32& val); void ReadAdaptive1248(std::istream& iStrm, uint64& val); + +void WriteAdaptive12(std::ostream& oStrm, const uint16 num); +void WriteAdaptive1234(std::ostream& oStrm, const uint32 num); void WriteAdaptive1248(std::ostream& oStrm, const uint64& val); + enum { IdSizeVariable = uint16_max, Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp 2014-02-23 19:53:03 UTC (rev 3763) @@ -209,7 +209,7 @@ } }; -std::ostream & operator << ( std::ostream & s, const commandlineflags & flags ) { +static std::ostream & operator << ( std::ostream & s, const commandlineflags & flags ) { s << "Quiet: " << flags.quiet << std::endl; s << "Verbose: " << flags.verbose << std::endl; s << "Mode : " << mode_to_string( flags.mode ) << std::endl; Modified: trunk/OpenMPT/soundlib/Load_amf.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_amf.cpp 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/soundlib/Load_amf.cpp 2014-02-23 19:53:03 UTC (rev 3763) @@ -190,8 +190,8 @@ // Read a single AMF track (channel) into a pattern. -void AMFReadPattern(CPattern &pattern, CHANNELINDEX chn, FileReader &fileChunk) -//----------------------------------------------------------------------------- +static void AMFReadPattern(CPattern &pattern, CHANNELINDEX chn, FileReader &fileChunk) +//------------------------------------------------------------------------------------ { fileChunk.Rewind(); ModCommand::INSTR lastInstr = 0; Modified: trunk/OpenMPT/soundlib/Load_dmf.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_dmf.cpp 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/soundlib/Load_dmf.cpp 2014-02-23 19:53:03 UTC (rev 3763) @@ -1123,8 +1123,8 @@ // DMF Huffman ReadBits -BYTE DMFReadBits(DMFHTree *tree, uint32 nbits) -//-------------------------------------------- +static BYTE DMFReadBits(DMFHTree *tree, uint32 nbits) +//--------------------------------------------------- { uint8 x = 0, bitv = 1; while(nbits--) @@ -1148,8 +1148,8 @@ // tree: [8-bit value][12-bit index][12-bit index] = 32-bit // -void DMFNewNode(DMFHTree *tree) -//----------------------------- +static void DMFNewNode(DMFHTree *tree) +//------------------------------------ { uint8 isleft, isright; int actnode; Modified: trunk/OpenMPT/soundlib/Load_it.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/soundlib/Load_it.cpp 2014-02-23 19:53:03 UTC (rev 3763) @@ -1052,8 +1052,8 @@ #ifndef MODPLUG_NO_FILESAVE // Save edit history. Pass a null pointer for *f to retrieve the number of bytes that would be written. -uint32 SaveITEditHistory(const CSoundFile *pSndFile, FILE *f) -//----------------------------------------------------------- +static uint32 SaveITEditHistory(const CSoundFile *pSndFile, FILE *f) +//------------------------------------------------------------------ { size_t num = pSndFile->GetFileHistory().size(); #ifdef MODPLUG_TRACKER Modified: trunk/OpenMPT/soundlib/Load_mdl.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_mdl.cpp 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/soundlib/Load_mdl.cpp 2014-02-23 19:53:03 UTC (rev 3763) @@ -101,8 +101,8 @@ #endif -void ConvertMDLCommand(ModCommand *m, UINT eff, UINT data) -//-------------------------------------------------------- +static void ConvertMDLCommand(ModCommand *m, UINT eff, UINT data) +//--------------------------------------------------------------- { UINT command = 0, param = data; switch(eff) @@ -178,8 +178,8 @@ // Convert MDL envelope data (env points and flags) -void ConvertMDLEnvelope(const unsigned char *pMDLEnv, InstrumentEnvelope *pMPTEnv) -//-------------------------------------------------------------------------------- +static void ConvertMDLEnvelope(const unsigned char *pMDLEnv, InstrumentEnvelope *pMPTEnv) +//--------------------------------------------------------------------------------------- { WORD nCurTick = 1; pMPTEnv->nNodes = 15; @@ -202,8 +202,8 @@ } -void UnpackMDLTrack(ModCommand *pat, UINT nChannels, UINT nRows, UINT nTrack, const BYTE *lpTracks) -//------------------------------------------------------------------------------------------------- +static void UnpackMDLTrack(ModCommand *pat, UINT nChannels, UINT nRows, UINT nTrack, const BYTE *lpTracks) +//-------------------------------------------------------------------------------------------------------- { ModCommand cmd, *m = pat; UINT len = *((WORD *)lpTracks); Modified: trunk/OpenMPT/soundlib/Load_okt.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_okt.cpp 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/soundlib/Load_okt.cpp 2014-02-23 19:53:03 UTC (rev 3763) @@ -71,8 +71,8 @@ #endif // Parse the sample header block -void ReadOKTSamples(FileReader &chunk, std::vector<bool> &sample7bit, CSoundFile *pSndFile) -//----------------------------------------------------------------------------------------- +static void ReadOKTSamples(FileReader &chunk, std::vector<bool> &sample7bit, CSoundFile *pSndFile) +//------------------------------------------------------------------------------------------------ { pSndFile->m_nSamples = MIN((SAMPLEINDEX)(chunk.BytesLeft() / sizeof(OktSample)), MAX_SAMPLES - 1); // typically 36 sample7bit.resize(pSndFile->GetNumSamples()); @@ -112,8 +112,8 @@ // Parse a pattern block -void ReadOKTPattern(FileReader &chunk, PATTERNINDEX nPat, CSoundFile &sndFile) -//---------------------------------------------------------------------------- +static void ReadOKTPattern(FileReader &chunk, PATTERNINDEX nPat, CSoundFile &sndFile) +//----------------------------------------------------------------------------------- { if(!chunk.CanRead(2)) { Modified: trunk/OpenMPT/soundlib/Load_psm.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_psm.cpp 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/soundlib/Load_psm.cpp 2014-02-23 19:53:03 UTC (rev 3763) @@ -241,8 +241,8 @@ // Portamento effect conversion (depending on format version) -uint8 ConvertPSMPorta(uint8 param, bool newFormat) -//------------------------------------------------ +static uint8 ConvertPSMPorta(uint8 param, bool newFormat) +//------------------------------------------------------- { return (newFormat ? param Modified: trunk/OpenMPT/soundlib/Load_xm.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_xm.cpp 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/soundlib/Load_xm.cpp 2014-02-23 19:53:03 UTC (rev 3763) @@ -117,8 +117,8 @@ // Read .XM patterns -void ReadXMPatterns(FileReader &file, const XMFileHeader &fileHeader, CSoundFile &sndFile) -//---------------------------------------------------------------------------------------- +static void ReadXMPatterns(FileReader &file, const XMFileHeader &fileHeader, CSoundFile &sndFile) +//----------------------------------------------------------------------------------------------- { // Reading patterns sndFile.Patterns.ResizeArray(fileHeader.patterns); Modified: trunk/OpenMPT/soundlib/MixerLoops.cpp =================================================================== --- trunk/OpenMPT/soundlib/MixerLoops.cpp 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/soundlib/MixerLoops.cpp 2014-02-23 19:53:03 UTC (rev 3763) @@ -17,6 +17,9 @@ #include "stdafx.h" + +#include "MixerLoops.h" + #include "Sndfile.h" Modified: trunk/OpenMPT/soundlib/MixerLoops.h =================================================================== --- trunk/OpenMPT/soundlib/MixerLoops.h 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/soundlib/MixerLoops.h 2014-02-23 19:53:03 UTC (rev 3763) @@ -11,6 +11,9 @@ #pragma once +#include "Mixer.h" + + struct ModChannel; Modified: trunk/OpenMPT/soundlib/SampleFormats.cpp =================================================================== --- trunk/OpenMPT/soundlib/SampleFormats.cpp 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/soundlib/SampleFormats.cpp 2014-02-23 19:53:03 UTC (rev 3763) @@ -334,8 +334,6 @@ //////////////////////////////////////////////////////////////////////////////// // WAV Open -extern bool IMAADPCMUnpack16(int16 *target, SmpLength sampleLen, FileReader file, uint16 blockAlign); - bool CSoundFile::ReadWAVSample(SAMPLEINDEX nSample, FileReader &file, bool mayNormalize, FileReader *wsmpChunk) //------------------------------------------------------------------------------------------------------------- { @@ -621,8 +619,8 @@ } -void PatchToSample(CSoundFile *that, SAMPLEINDEX nSample, LPBYTE lpStream, DWORD dwMemLength) -//------------------------------------------------------------------------------------------- +static void PatchToSample(CSoundFile *that, SAMPLEINDEX nSample, LPBYTE lpStream, DWORD dwMemLength) +//-------------------------------------------------------------------------------------------------- { ModSample &sample = that->GetSample(nSample); DWORD dwMemPos = sizeof(GF1SAMPLEHEADER); Modified: trunk/OpenMPT/soundlib/SampleIO.cpp =================================================================== --- trunk/OpenMPT/soundlib/SampleIO.cpp 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/soundlib/SampleIO.cpp 2014-02-23 19:53:03 UTC (rev 3763) @@ -17,12 +17,6 @@ #include "ITCompression.h" -// External decompressors -extern void AMSUnpack(const int8 * const source, size_t sourceSize, void * const dest, const size_t destSize, char packCharacter); -extern uint16 MDLReadBits(uint32 &bitbuf, uint32 &bitnum, const uint8 *(&ibuf), int8 n); -extern uintptr_t DMFUnpack(LPBYTE psample, const uint8 *ibuf, const uint8 *ibufmax, uint32 maxlen); - - #if MPT_COMPILER_GCC #if MPT_GCC_AT_LEAST(4,6,0) #pragma GCC diagnostic push Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2014-02-23 19:53:03 UTC (rev 3763) @@ -30,12 +30,7 @@ #include "../unarchiver/unarchiver.h" #endif // NO_ARCHIVE_SUPPORT -bool UnpackXPK(std::vector<char> &unpackedData, FileReader &file); -bool UnpackPP20(std::vector<char> &unpackedData, FileReader &file); -bool UnpackMMCMP(std::vector<char> &unpackedData, FileReader &file); - - // -> CODE#0027 // -> DESC="per-instrument volume ramping setup (refered as attack)" Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/soundlib/Sndfile.h 2014-02-23 19:53:03 UTC (rev 3763) @@ -58,7 +58,17 @@ // -------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------- +// Sample decompression +void AMSUnpack(const int8 * const source, size_t sourceSize, void * const dest, const size_t destSize, char packCharacter); +uint16 MDLReadBits(uint32 &bitbuf, uint32 &bitnum, const uint8 *(&ibuf), int8 n); +uintptr_t DMFUnpack(LPBYTE psample, const uint8 *ibuf, const uint8 *ibufmax, uint32 maxlen); +bool IMAADPCMUnpack16(int16 *target, SmpLength sampleLen, FileReader file, uint16 blockAlign); +// Module decompression +bool UnpackXPK(std::vector<char> &unpackedData, FileReader &file); +bool UnpackPP20(std::vector<char> &unpackedData, FileReader &file); +bool UnpackMMCMP(std::vector<char> &unpackedData, FileReader &file); + //////////////////////////////////////////////////////////////////////// // Reverberation Modified: trunk/OpenMPT/soundlib/load_j2b.cpp =================================================================== --- trunk/OpenMPT/soundlib/load_j2b.cpp 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/soundlib/load_j2b.cpp 2014-02-23 19:53:03 UTC (rev 3763) @@ -581,8 +581,8 @@ // Convert RIFF AM(FF) pattern data to MPT pattern data. -bool ConvertAMPattern(FileReader chunk, PATTERNINDEX pat, bool isAM, CSoundFile &sndFile) -//--------------------------------------------------------------------------------------- +static bool ConvertAMPattern(FileReader chunk, PATTERNINDEX pat, bool isAM, CSoundFile &sndFile) +//---------------------------------------------------------------------------------------------- { // Effect translation LUT static const ModCommand::COMMAND amEffTrans[] = Modified: trunk/OpenMPT/soundlib/tuningcollection.h =================================================================== --- trunk/OpenMPT/soundlib/tuningcollection.h 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/soundlib/tuningcollection.h 2014-02-23 19:53:03 UTC (rev 3763) @@ -19,6 +19,7 @@ namespace CTuningS11n { void ReadTuning(std::istream& iStrm, CTuningCollection& Tc, const size_t); + void WriteTuning(std::ostream& oStrm, const CTuning& t); } Modified: trunk/OpenMPT/test/test.cpp =================================================================== --- trunk/OpenMPT/test/test.cpp 2014-02-23 18:49:17 UTC (rev 3762) +++ trunk/OpenMPT/test/test.cpp 2014-02-23 19:53:03 UTC (rev 3763) @@ -966,8 +966,8 @@ // Check if our test file was loaded correctly. -void TestLoadXMFile(const CSoundFile &sndFile) -//-------------------------------------------- +static void TestLoadXMFile(const CSoundFile &sndFile) +//--------------------------------------------------- { #ifdef MODPLUG_TRACKER const CModDoc *pModDoc = sndFile.GetpModDoc(); @@ -1165,8 +1165,8 @@ // Check if our test file was loaded correctly. -void TestLoadMPTMFile(const CSoundFile &sndFile) -//---------------------------------------------- +static void TestLoadMPTMFile(const CSoundFile &sndFile) +//----------------------------------------------------- { // Global Variables @@ -1422,8 +1422,8 @@ // Check if our test file was loaded correctly. -void TestLoadS3MFile(const CSoundFile &sndFile, bool resaved) -//----------------------------------------------------------- +static void TestLoadS3MFile(const CSoundFile &sndFile, bool resaved) +//------------------------------------------------------------------ { // Global Variables @@ -1778,8 +1778,8 @@ } -void RunITCompressionTest(const std::vector<int8> &sampleData, ChannelFlags smpFormat, bool it215, int testcount) -//--------------------------------------------------------------------------------------------------------------- +static void RunITCompressionTest(const std::vector<int8> &sampleData, ChannelFlags smpFormat, bool it215, int testcount) +//---------------------------------------------------------------------------------------------------------------------- { mpt::PathString filename = GetTestFilenameBase() + MPT_PATHSTRING("itcomp") + mpt::PathString::FromWide(StringifyW(testcount)) + MPT_PATHSTRING(".raw"); @@ -1854,15 +1854,15 @@ } -double Rand01() {return rand() / double(RAND_MAX);} +static double Rand01() {return rand() / double(RAND_MAX);} template <class T> T Rand(const T& min, const T& max) {return Util::Round<T>(min + Rand01() * (max - min));} -void GenerateCommands(CPattern& pat, const double dProbPcs, const double dProbPc) -//------------------------------------------------------------------------------- +static void GenerateCommands(CPattern& pat, const double dProbPcs, const double dProbPc) +//-------------------------------------------------------------------------------------- { const double dPcxProb = dProbPcs + dProbPc; const CPattern::const_iterator end = pat.End(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |