mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 22:36:39 +00:00
Replace boost::scoped_array with std::vector
This commit is contained in:
parent
3a9a60a453
commit
c9e5f0208d
3 changed files with 6 additions and 11 deletions
|
@ -31,8 +31,6 @@
|
||||||
//#include <iostream> // FIXME: for debugging only
|
//#include <iostream> // FIXME: for debugging only
|
||||||
//#include <iomanip> // FIXME: for debugging only
|
//#include <iomanip> // FIXME: for debugging only
|
||||||
|
|
||||||
//#include <boost/scoped_array.hpp> // FIXME
|
|
||||||
|
|
||||||
//#include "formid.hpp" // FIXME:
|
//#include "formid.hpp" // FIXME:
|
||||||
|
|
||||||
#include "reader.hpp"
|
#include "reader.hpp"
|
||||||
|
@ -131,8 +129,8 @@ void ESM4::MediaLocationController::load(ESM4::Reader& reader)
|
||||||
case ESM4::SUB_FNAM: // always 0? 4 bytes
|
case ESM4::SUB_FNAM: // always 0? 4 bytes
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
boost::scoped_array<unsigned char> mDataBuf(new unsigned char[subHdr.dataSize]);
|
std::vector<unsigned char> mDataBuf(subHdr.dataSize);
|
||||||
reader.get(mDataBuf.get(), subHdr.dataSize);
|
reader.get(mDataBuf.data(), subHdr.dataSize);
|
||||||
|
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
ss << mEditorId << " " << ESM::printName(subHdr.typeId) << ":size " << subHdr.dataSize << "\n";
|
ss << mEditorId << " " << ESM::printName(subHdr.typeId) << ":size " << subHdr.dataSize << "\n";
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
|
|
||||||
//#include <boost/iostreams/filtering_streambuf.hpp>
|
//#include <boost/iostreams/filtering_streambuf.hpp>
|
||||||
//#include <boost/iostreams/copy.hpp>
|
//#include <boost/iostreams/copy.hpp>
|
||||||
#include <boost/scoped_array.hpp>
|
|
||||||
|
|
||||||
#include "formid.hpp" // NOTE: for testing only
|
#include "formid.hpp" // NOTE: for testing only
|
||||||
#include "reader.hpp"
|
#include "reader.hpp"
|
||||||
|
@ -261,8 +260,8 @@ void ESM4::Npc::load(ESM4::Reader& reader)
|
||||||
case ESM4::SUB_DSTF:
|
case ESM4::SUB_DSTF:
|
||||||
{
|
{
|
||||||
#if 1
|
#if 1
|
||||||
boost::scoped_array<unsigned char> dataBuf(new unsigned char[subHdr.dataSize]);
|
std::vector<unsigned char> dataBuf(subHdr.dataSize);
|
||||||
reader.get(dataBuf.get(), subHdr.dataSize);
|
reader.get(dataBuf.data(), subHdr.dataSize);
|
||||||
|
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
ss << mEditorId << " " << ESM::printName(subHdr.typeId) << ":size " << subHdr.dataSize << "\n";
|
ss << mEditorId << " " << ESM::printName(subHdr.typeId) << ":size " << subHdr.dataSize << "\n";
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
//#include <iostream> // FIXME: for debugging only
|
//#include <iostream> // FIXME: for debugging only
|
||||||
//#include <iomanip> // 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 "formid.hpp" // FIXME: for mEditorId workaround
|
||||||
#include "reader.hpp"
|
#include "reader.hpp"
|
||||||
//#include "writer.hpp"
|
//#include "writer.hpp"
|
||||||
|
@ -126,8 +124,8 @@ void ESM4::Pathgrid::load(ESM4::Reader& reader)
|
||||||
case ESM4::SUB_PGAG:
|
case ESM4::SUB_PGAG:
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
boost::scoped_array<unsigned char> mDataBuf(new unsigned char[subHdr.dataSize]);
|
std::vector<unsigned char> mDataBuf(subHdr.dataSize);
|
||||||
reader.get(mDataBuf.get(), subHdr.dataSize);
|
reader.get(mDataBuf.data(), subHdr.dataSize);
|
||||||
|
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
ss << mEditorId << " " << ESM::printName(subHdr.typeId) << ":size " << subHdr.dataSize << "\n";
|
ss << mEditorId << " " << ESM::printName(subHdr.typeId) << ":size " << subHdr.dataSize << "\n";
|
||||||
|
|
Loading…
Reference in a new issue