Permalink
Browse files

Use proper new/delete for int arrays

  • Loading branch information...
daniel-kristjansson committed Dec 11, 2012
1 parent 657e152 commit fba5c6fc7aad01422e77926062d79796ce6c046e
Showing with 8 additions and 6 deletions.
  1. +8 −6 mythplugins/mythgallery/mythgallery/sequence.h
@@ -116,7 +116,7 @@ class SequenceRandomBase : public SequenceBase
{
if(seq)
{
delete seq;
delete[] seq;
}
};
@@ -125,9 +125,11 @@ class SequenceRandomBase : public SequenceBase
SequenceBase::reset(_len);
if(seq)
{
delete seq;
delete[] seq;
}
seq = new(int[len]);
seq = new int[len];
for( int i = 0 ; i < len ; i++ )
{
seq[i] = -1;
@@ -181,7 +183,7 @@ class SequenceShuffle : public SequenceRandomBase
{
if (map)
{
delete map;
delete[] map;
}
};
@@ -191,10 +193,10 @@ class SequenceShuffle : public SequenceRandomBase
if(map)
{
delete map;
delete[] map;
}
map = new(int[(len / sizeof(int)) + 1]);
map = new int[(len / sizeof(int)) + 1];
for( int i = 0 ; i < len ; i++ )
{

0 comments on commit fba5c6f

Please sign in to comment.