Commit c123af57 authored by John Selbie's avatar John Selbie

More memset removal

parent 5accc692
......@@ -53,7 +53,10 @@
#include <vector>
#include <list>
#include <string>
#include <sstream>
#include <memory>
#include <algorithm>
#include <atomic>
#ifdef IS_LINUX
......
......@@ -240,7 +240,7 @@ public:
{
if (_lookuptable != nullptr)
{
memset(_lookuptable, '\0', sizeof(ItemNodePtr)*_tsize);
std::fill(_lookuptable, _lookuptable+_tsize, nullptr);
}
if ((_fsize > 0) && (_itemnodes != nullptr))
......
......@@ -17,8 +17,6 @@
#include "commonincludes.hpp"
#include <sstream>
#include <atomic>
#include "stringhelper.h"
......
......@@ -136,11 +136,9 @@ HRESULT CTestFastHash::ValidateRangeInIndex(int first, int last)
{
HRESULT hr = S_OK;
const int length = last - first + 1;
bool* arr = new bool[length];
bool* arr = new bool[length](); // zero-init
size_t size = _hashtable.Size();
memset(arr, '\0', length);
for (int x = 0; x < (int)size; x++)
{
Item* pItem = _hashtable.LookupValueByIndex(x);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment