Build fixes (gcc4).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30136 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1e855c376c
commit
0b8b543af8
|
@ -41,9 +41,9 @@ const char* lib_monkeys_audio_components()
|
|||
//------------------------------------------------------------------------------
|
||||
const char* lib_monkeys_audio_copyright()
|
||||
{
|
||||
static string saCright;
|
||||
static std::string saCright;
|
||||
|
||||
saCright = string(gCright)+"\n"+gOriginal;
|
||||
saCright = std::string(gCright)+"\n"+gOriginal;
|
||||
return saCright.c_str();
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include "All.h"
|
||||
#include "APEDecompress.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "APEInfo.h"
|
||||
#include "Prepare.h"
|
||||
#include "UnBitArray.h"
|
||||
|
@ -35,8 +37,11 @@ CAPEDecompress::CAPEDecompress(int * pErrorCode, CAPEInfo * pAPEInfo, int nStart
|
|||
m_bErrorDecodingCurrentFrame = FALSE;
|
||||
|
||||
// set the "real" start and finish blocks
|
||||
m_nStartBlock = (nStartBlock < 0) ? 0 : min(nStartBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
|
||||
m_nFinishBlock = (nFinishBlock < 0) ? GetInfo(APE_INFO_TOTAL_BLOCKS) : min(nFinishBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
|
||||
m_nStartBlock = (nStartBlock < 0)
|
||||
? 0 : std::min(nStartBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
|
||||
m_nFinishBlock = (nFinishBlock < 0)
|
||||
? GetInfo(APE_INFO_TOTAL_BLOCKS)
|
||||
: std::min(nFinishBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
|
||||
m_bIsRanged = (m_nStartBlock != 0) || (m_nFinishBlock != GetInfo(APE_INFO_TOTAL_BLOCKS));
|
||||
}
|
||||
|
||||
|
@ -85,7 +90,7 @@ int CAPEDecompress::GetData(char * pBuffer, int nBlocks, int * pBlocksRetrieved)
|
|||
|
||||
// cap
|
||||
int nBlocksUntilFinish = m_nFinishBlock - m_nCurrentBlock;
|
||||
const int nBlocksToRetrieve = min(nBlocks, nBlocksUntilFinish);
|
||||
const int nBlocksToRetrieve = std::min(nBlocks, nBlocksUntilFinish);
|
||||
|
||||
// get the data
|
||||
unsigned char * pOutputBuffer = (unsigned char *) pBuffer;
|
||||
|
@ -99,7 +104,7 @@ int CAPEDecompress::GetData(char * pBuffer, int nBlocks, int * pBlocksRetrieved)
|
|||
|
||||
// analyze how much to remove from the buffer
|
||||
const int nFrameBufferBlocks = m_nFrameBufferFinishedBlocks;
|
||||
nBlocksThisPass = min(nBlocksLeft, nFrameBufferBlocks);
|
||||
nBlocksThisPass = std::min(nBlocksLeft, nFrameBufferBlocks);
|
||||
|
||||
// remove as much as possible
|
||||
if (nBlocksThisPass > 0)
|
||||
|
@ -182,7 +187,7 @@ int CAPEDecompress::FillFrameBuffer()
|
|||
|
||||
int nFrameOffsetBlocks = m_nCurrentFrameBufferBlock % GetInfo(APE_INFO_BLOCKS_PER_FRAME);
|
||||
int nFrameBlocksLeft = nFrameBlocks - nFrameOffsetBlocks;
|
||||
int nBlocksThisPass = min(nFrameBlocksLeft, nBlocksLeft);
|
||||
int nBlocksThisPass = std::min(nFrameBlocksLeft, nBlocksLeft);
|
||||
|
||||
// start the frame if we need to
|
||||
if (nFrameOffsetBlocks == 0)
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
#include "MD5.h"
|
||||
#include "CharacterHelper.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
#define UNMAC_DECODER_OUTPUT_NONE 0
|
||||
#define UNMAC_DECODER_OUTPUT_WAV 1
|
||||
#define UNMAC_DECODER_OUTPUT_APE 2
|
||||
|
@ -204,7 +207,7 @@ int __stdcall VerifyFileW(const str_utf16 * pInputFilename, int * pPercentageDon
|
|||
nBytesRead = 1;
|
||||
while ((nBytesLeft > 0) && (nBytesRead > 0))
|
||||
{
|
||||
int nBytesToRead = min(16384, nBytesLeft);
|
||||
int nBytesToRead = std::min(16384, nBytesLeft);
|
||||
if (pIO->Read(spBuffer, nBytesToRead, &nBytesRead) != ERROR_SUCCESS)
|
||||
throw(ERROR_IO_READ);
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#include "All.h"
|
||||
#include "ID3Genres.h"
|
||||
#include "APETag.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "ID3Genres.h"
|
||||
#include "CharacterHelper.h"
|
||||
#include "IO.h"
|
||||
#include IO_HEADER_FILE
|
||||
|
@ -16,7 +19,7 @@ CAPETagField::CAPETagField(const str_utf16 * pFieldName, const void * pFieldValu
|
|||
memcpy(m_spFieldNameUTF16, pFieldName, (wcslen(pFieldName) + 1) * sizeof(str_utf16));
|
||||
|
||||
// data (we'll always allocate two extra bytes and memset to 0 so we're safely NULL terminated)
|
||||
m_nFieldValueBytes = max(nFieldBytes, 0);
|
||||
m_nFieldValueBytes = std::max(nFieldBytes, 0);
|
||||
m_spFieldValue.Assign(new char [m_nFieldValueBytes + 2], TRUE);
|
||||
memset(m_spFieldValue, 0, m_nFieldValueBytes + 2);
|
||||
if (m_nFieldValueBytes > 0)
|
||||
|
|
|
@ -17,14 +17,14 @@ public:
|
|||
int MaxGet();
|
||||
|
||||
// direct writing
|
||||
inline unsigned char * CCircleBuffer::GetDirectWritePointer()
|
||||
inline unsigned char * GetDirectWritePointer()
|
||||
{
|
||||
// return a pointer to the tail -- note that it will always be safe to write
|
||||
// at least m_nMaxDirectWriteBytes since we use an end cap region
|
||||
return &m_pBuffer[m_nTail];
|
||||
}
|
||||
|
||||
inline void CCircleBuffer::UpdateAfterDirectWrite(int nBytes)
|
||||
inline void UpdateAfterDirectWrite(int nBytes)
|
||||
{
|
||||
// update the tail
|
||||
m_nTail += nBytes;
|
||||
|
|
|
@ -86,6 +86,6 @@ public:
|
|||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif _MSC_VER
|
||||
#endif // _MSC_VER
|
||||
|
||||
#endif // #ifndef APE_SMARTPTR_H
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
#include "UnBitArray.h"
|
||||
#include "BitArray.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
const uint32 POWERS_OF_TWO_MINUS_ONE_REVERSED[33] = {4294967295,2147483647,1073741823,536870911,268435455,134217727,67108863,33554431,16777215,8388607,4194303,2097151,1048575,524287,262143,131071,65535,32767,16383,8191,4095,2047,1023,511,255,127,63,31,15,7,3,1,0};
|
||||
|
||||
const uint32 K_SUM_MIN_BOUNDARY[32] = {0,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,4194304,8388608,16777216,33554432,67108864,134217728,268435456,536870912,1073741824,2147483648,0,0,0,0};
|
||||
|
@ -108,7 +111,7 @@ int CUnBitArray::DecodeValueRange(UNBIT_ARRAY_STATE & BitArrayState)
|
|||
if (m_nVersion >= 3990)
|
||||
{
|
||||
// figure the pivot value
|
||||
int nPivotValue = max(BitArrayState.nKSum / 32, 1);
|
||||
int nPivotValue = std::max(BitArrayState.nKSum / 32, 1UL);
|
||||
|
||||
// get the overflow
|
||||
int nOverflow = 0;
|
||||
|
|
Loading…
Reference in New Issue