a little cleanup
fixed pvs-studio generated warnings fixed makefile remove vc debug symbols
This commit is contained in:
parent
eab08307da
commit
7d5d5ce81a
7 changed files with 29 additions and 57 deletions
|
|
@ -1015,9 +1015,6 @@ public:
|
|||
{
|
||||
T *entry = new T ();
|
||||
|
||||
if (entry == NULL)
|
||||
return NULL;
|
||||
|
||||
return Link (entry, next);
|
||||
}
|
||||
|
||||
|
|
@ -1167,8 +1164,7 @@ public:
|
|||
//
|
||||
void Destory (void)
|
||||
{
|
||||
if (m_elements != NULL)
|
||||
delete [] m_elements;
|
||||
delete [] m_elements;
|
||||
|
||||
m_elements = NULL;
|
||||
m_itemSize = 0;
|
||||
|
|
@ -1216,9 +1212,6 @@ public:
|
|||
|
||||
T *buffer = new T[checkSize];
|
||||
|
||||
if (buffer == NULL)
|
||||
return false;
|
||||
|
||||
if (keepData && m_elements != NULL)
|
||||
{
|
||||
if (checkSize < m_itemCount)
|
||||
|
|
@ -1571,17 +1564,12 @@ public:
|
|||
|
||||
T *buffer = new T[m_itemCount];
|
||||
|
||||
if (buffer == NULL)
|
||||
return;
|
||||
|
||||
if (m_elements != NULL)
|
||||
{
|
||||
for (int i = 0; i < m_itemCount; i++)
|
||||
buffer[i] = m_elements[i];
|
||||
}
|
||||
|
||||
if (m_elements != NULL)
|
||||
delete [] m_elements;
|
||||
delete [] m_elements;
|
||||
|
||||
m_elements = buffer;
|
||||
m_itemSize = m_itemCount;
|
||||
|
|
@ -2498,21 +2486,6 @@ public:
|
|||
return &m_bufferPtr[0];
|
||||
}
|
||||
|
||||
//
|
||||
// Function: ToString
|
||||
// Gets the string buffer.
|
||||
//
|
||||
// Returns:
|
||||
// Pointer to buffer.
|
||||
//
|
||||
const char *ToString (void)
|
||||
{
|
||||
if (m_bufferPtr == NULL || *m_bufferPtr == 0x0)
|
||||
return "";
|
||||
|
||||
return &m_bufferPtr[0];
|
||||
}
|
||||
|
||||
//
|
||||
// Function: ToString
|
||||
// Gets the string buffer (constant).
|
||||
|
|
@ -3761,9 +3734,9 @@ public:
|
|||
// Returns:
|
||||
// True if operation succeeded, false otherwise.
|
||||
//
|
||||
bool Open (String fileName, String mode)
|
||||
bool Open (const String &fileName, const String &mode)
|
||||
{
|
||||
if ((m_handle = fopen (fileName, mode)) == NULL)
|
||||
if ((m_handle = fopen (fileName.GetBuffer (), mode.GetBuffer ())) == NULL)
|
||||
return false;
|
||||
|
||||
fseek (m_handle, 0L, SEEK_END);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue