Browse Source

Minor clean-ups

tags/2021-05-28
Julian Storer 16 years ago
parent
commit
0c1df99d2d
4 changed files with 9 additions and 9 deletions
  1. +1
    -1
      juce_amalgamated.cpp
  2. +6
    -6
      src/containers/juce_Array.h
  3. +1
    -1
      src/containers/juce_ArrayAllocationBase.h
  4. +1
    -1
      src/native/linux/juce_linux_Network.cpp

+ 1
- 1
juce_amalgamated.cpp View File

@@ -229811,7 +229811,7 @@ public:
if (select (socketHandle + 1, &readbits, 0, 0, &tv) <= 0)
return 0; // (timeout)

const int bytesRead = jmax (0, recv (socketHandle, buffer, bytesToRead, MSG_WAITALL));
const int bytesRead = jmax (0, (int) recv (socketHandle, buffer, bytesToRead, MSG_WAITALL));
readPosition += bytesRead;
return bytesRead;
}


+ 6
- 6
src/containers/juce_Array.h View File

@@ -70,7 +70,7 @@ public:
other.lockArray();
numUsed = other.numUsed;
data.setAllocatedSize (other.numUsed);
for (int i = 0; i < numUsed; ++i)
new (data.elements + i) ElementType (other.data.elements[i]);
@@ -122,11 +122,11 @@ public:
if (other.size() > numUsed)
{
data.ensureAllocatedSize (other.size());
int i = 0;
for (; i < numUsed; ++i)
data.elements[i] = other.data.elements[i];
numUsed = other.size();
for (; i < numUsed; ++i)
new (data.elements + i) ElementType (other.data.elements[i]);
@@ -134,7 +134,7 @@ public:
else
{
numUsed = other.size();
for (int i = 0; i < numUsed; ++i)
data.elements[i] = other.data.elements[i];
@@ -462,7 +462,7 @@ public:
lock.enter();
data.ensureAllocatedSize (numUsed + numberOfTimesToInsertIt);
ElementType* insertPos;
if (((unsigned int) indexToInsertAt) < (unsigned int) numUsed)
{
insertPos = data.elements + indexToInsertAt;
@@ -847,7 +847,7 @@ public:
void removeLast (int howManyToRemove = 1) throw()
{
lock.enter();
if (howManyToRemove > numUsed)
howManyToRemove = numUsed;


+ 1
- 1
src/containers/juce_ArrayAllocationBase.h View File

@@ -97,7 +97,7 @@ public:
if (maxNumElements < numAllocated)
setAllocatedSize (maxNumElements);
}
/** Swap the contents of two objects. */
void swapWith (ArrayAllocationBase <ElementType>& other)
{


+ 1
- 1
src/native/linux/juce_linux_Network.cpp View File

@@ -261,7 +261,7 @@ public:
if (select (socketHandle + 1, &readbits, 0, 0, &tv) <= 0)
return 0; // (timeout)
const int bytesRead = jmax (0, recv (socketHandle, buffer, bytesToRead, MSG_WAITALL));
const int bytesRead = jmax (0, (int) recv (socketHandle, buffer, bytesToRead, MSG_WAITALL));
readPosition += bytesRead;
return bytesRead;
}


Loading…
Cancel
Save