More work on size_t vs unsigned long

This commit is contained in:
Alex Harker
2019-06-15 23:39:49 +01:00
parent f453f02cee
commit d010ed6efc
5 changed files with 14 additions and 6 deletions
+1 -1
View File
@@ -558,7 +558,7 @@ void FrameLib_DSP::dependenciesReady()
void FrameLib_DSP::setOutputDependencyCount()
{
mOutputMemoryCount = mOutputDependencies.size();
mOutputMemoryCount = static_cast<long>(mOutputDependencies.size());
}
// Manage Output Memory
+1 -1
View File
@@ -285,7 +285,7 @@ FrameLib_LocalAllocator::Storage::~Storage()
mAllocator.dealloc(mData);
}
void FrameLib_LocalAllocator::Storage::resize(bool tagged, size_t size)
void FrameLib_LocalAllocator::Storage::resize(bool tagged, unsigned long size)
{
size_t actualSize = tagged ? Serial::inPlaceSize(size) : size * sizeof(double);
size_t maxSize = actualSize << 1;
+2 -2
View File
@@ -314,7 +314,7 @@ public:
// Resize
void resize(bool tagged, size_t size) { mStorage->resize(tagged, size); }
void resize(bool tagged, unsigned long size) { mStorage->resize(tagged, size); }
private:
@@ -337,7 +337,7 @@ public:
// Resize the storage
void resize(bool tagged, size_t size);
void resize(bool tagged, unsigned long size);
// Constructor / Destructor
+8 -2
View File
@@ -9,7 +9,10 @@ unsigned long FrameLib_Multistream::getInputNumChans(unsigned long inIdx)
{
MultistreamConnection connection = getConnection(inIdx);
return connection.mObject ? connection.mObject->mOutputs[connection.mIndex].size() : 0;
if (connection.mObject)
return static_cast<unsigned long>(connection.mObject->mOutputs[connection.mIndex].size());
return 0;
}
FrameLib_Multistream::BlockConnection FrameLib_Multistream::getInputChan(unsigned long inIdx, unsigned long chan)
@@ -23,7 +26,10 @@ unsigned long FrameLib_Multistream::getOrderingConnectionNumChans(unsigned long
{
MultistreamConnection connection = getOrderingConnection(idx);
return connection.mObject ? connection.mObject->mOutputs[connection.mIndex].size() : 0;
if (connection.mObject)
return static_cast<unsigned long>(connection.mObject->mOutputs[connection.mIndex].size());
return 0;
}
FrameLib_Multistream::BlockConnection FrameLib_Multistream::getOrderingConnectionChan(unsigned long idx, unsigned long chan)
@@ -69,6 +69,8 @@ size_t FrameLib_Parameters::Serial::Iterator::getSize() const
case kVector: return calcSize(entry.mTag, entry.mSize);
case kSingleString: return calcSize(entry.mTag, entry.data<char>());
}
return 0;
}
// Reads