Merge branch 'fix-7117' into 'master'

Replace boost::scoped_array with std::vector

Closes #7117

See merge request OpenMW/openmw!2662
7220-lua-add-a-general-purpose-lexical-parser
psi29a 2 years ago
commit bc90636316

@ -31,8 +31,6 @@
//#include <iostream> // FIXME: for debugging only
//#include <iomanip> // FIXME: for debugging only
//#include <boost/scoped_array.hpp> // FIXME
//#include "formid.hpp" // FIXME:
#include "reader.hpp"
@ -131,8 +129,8 @@ void ESM4::MediaLocationController::load(ESM4::Reader& reader)
case ESM4::SUB_FNAM: // always 0? 4 bytes
{
#if 0
boost::scoped_array<unsigned char> mDataBuf(new unsigned char[subHdr.dataSize]);
reader.get(mDataBuf.get(), subHdr.dataSize);
std::vector<unsigned char> mDataBuf(subHdr.dataSize);
reader.get(mDataBuf.data(), subHdr.dataSize);
std::ostringstream ss;
ss << mEditorId << " " << ESM::printName(subHdr.typeId) << ":size " << subHdr.dataSize << "\n";

@ -35,7 +35,6 @@
//#include <boost/iostreams/filtering_streambuf.hpp>
//#include <boost/iostreams/copy.hpp>
#include <boost/scoped_array.hpp>
#include "formid.hpp" // NOTE: for testing only
#include "reader.hpp"
@ -261,8 +260,8 @@ void ESM4::Npc::load(ESM4::Reader& reader)
case ESM4::SUB_DSTF:
{
#if 1
boost::scoped_array<unsigned char> dataBuf(new unsigned char[subHdr.dataSize]);
reader.get(dataBuf.get(), subHdr.dataSize);
std::vector<unsigned char> dataBuf(subHdr.dataSize);
reader.get(dataBuf.data(), subHdr.dataSize);
std::ostringstream ss;
ss << mEditorId << " " << ESM::printName(subHdr.typeId) << ":size " << subHdr.dataSize << "\n";

@ -30,8 +30,6 @@
//#include <iostream> // FIXME: for debugging only
//#include <iomanip> // FIXME: for debugging only
//#include <boost/scoped_array.hpp> // FIXME for debugging only
#include "formid.hpp" // FIXME: for mEditorId workaround
#include "reader.hpp"
//#include "writer.hpp"
@ -126,8 +124,8 @@ void ESM4::Pathgrid::load(ESM4::Reader& reader)
case ESM4::SUB_PGAG:
{
#if 0
boost::scoped_array<unsigned char> mDataBuf(new unsigned char[subHdr.dataSize]);
reader.get(mDataBuf.get(), subHdr.dataSize);
std::vector<unsigned char> mDataBuf(subHdr.dataSize);
reader.get(mDataBuf.data(), subHdr.dataSize);
std::ostringstream ss;
ss << mEditorId << " " << ESM::printName(subHdr.typeId) << ":size " << subHdr.dataSize << "\n";

Loading…
Cancel
Save