From 92fb5450bc06f848dbccaf4a5a7d058e476a6c35 Mon Sep 17 00:00:00 2001 From: olsner Date: Sat, 4 Feb 2006 22:44:52 +0000 Subject: [PATCH] CVFSInputSource clean-up, added headers to adts.{h,cpp} This was SVN commit r3472. --- source/lib/adts.cpp | 2 +- source/lib/adts.h | 1 + source/ps/XML/XML.h | 8 ++++---- source/ps/XML/XMLUtils.cpp | 11 ----------- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/source/lib/adts.cpp b/source/lib/adts.cpp index 48e4911fa2..c29cb7463d 100755 --- a/source/lib/adts.cpp +++ b/source/lib/adts.cpp @@ -1,7 +1,7 @@ #include "precompiled.h" #include "adts.h" - +#include //----------------------------------------------------------------------------- // built-in self test diff --git a/source/lib/adts.h b/source/lib/adts.h index 151018ca7a..d5c65d4a09 100755 --- a/source/lib/adts.h +++ b/source/lib/adts.h @@ -3,6 +3,7 @@ #include "lib.h" +#include #include #include diff --git a/source/ps/XML/XML.h b/source/ps/XML/XML.h index 4ff80b6205..fbb7f9a9cd 100755 --- a/source/ps/XML/XML.h +++ b/source/ps/XML/XML.h @@ -76,21 +76,21 @@ class CVFSInputSource: public InputSource FileIOBuf m_pBuffer; size_t m_BufferSize; + CVFSInputSource(const CVFSInputSource &); + CVFSInputSource &operator = (const CVFSInputSource &); + public: CVFSInputSource(): m_pBuffer(NULL), m_BufferSize(0) {} - ~CVFSInputSource(); + virtual ~CVFSInputSource(); // Open a VFS path for XML parsing // returns 0 if successful, -1 on failure int OpenFile(const char *path, uint flags); - // Allow the use of externally-loaded files - void OpenBuffer(const char* path, const void* buffer, const size_t buffersize); - virtual BinInputStream *makeStream() const; }; diff --git a/source/ps/XML/XMLUtils.cpp b/source/ps/XML/XMLUtils.cpp index ff35e4eec7..a6b3c0ca40 100755 --- a/source/ps/XML/XMLUtils.cpp +++ b/source/ps/XML/XMLUtils.cpp @@ -65,17 +65,6 @@ int CVFSInputSource::OpenFile(const char *path, uint flags = 0) return 0; } -void CVFSInputSource::OpenBuffer(const char* path, const void* buffer, const size_t buffersize) -{ -debug_warn("who guarantees that buffer isn't already freed?"); - m_pBuffer = (FileIOBuf)buffer; - m_BufferSize = buffersize; - - XMLCh *sysId=XMLString::transcode(path); - setSystemId(sysId); - XMLString::release(&sysId); -} - CVFSInputSource::~CVFSInputSource() { // our buffer was vfs_load-ed; free it now