std::auto_ptr -> boost::scoped_ptr and compile fix.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4490 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-06-26 16:57:59 +00:00
parent 1bb197b5d4
commit a31eb3b2df
5 changed files with 23 additions and 9 deletions

View File

@ -1,3 +1,9 @@
2002-06-26 Angus Leeming <leeming@lyx.org>
* GraphicsLoader.[Ch]: use boost::scoped_ptr in preference to
std::auto_ptr. Define an empty Loader d-tor out-of-line to ensure it
compiles.
2002-06-26 Angus Leeming <leeming@lyx.org> 2002-06-26 Angus Leeming <leeming@lyx.org>
* GraphicsTypes.h: add "Ready" to the ImageStatus enum. * GraphicsTypes.h: add "Ready" to the ImageStatus enum.

View File

@ -153,6 +153,10 @@ Loader::Loader(string const & file, GParams const & params)
} }
Loader::~Loader()
{}
void Loader::reset(string const & file, DisplayType type) void Loader::reset(string const & file, DisplayType type)
{ {
pimpl_->unsetOldFile(); pimpl_->unsetOldFile();

View File

@ -28,7 +28,7 @@
#include "LString.h" #include "LString.h"
#include <boost/signals/signal0.hpp> #include <boost/signals/signal0.hpp>
#include <memory> #include <boost/scoped_ptr.hpp>
namespace grfx { namespace grfx {
@ -46,6 +46,9 @@ public:
/// The image is transformed before display. /// The image is transformed before display.
Loader(string const & file_with_path, GParams const &); Loader(string const & file_with_path, GParams const &);
/// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
~Loader();
/// The file can be changed, or the display params, or both. /// The file can be changed, or the display params, or both.
void reset(string const & file_with_path, DisplayType = ColorDisplay); void reset(string const & file_with_path, DisplayType = ColorDisplay);
/// ///
@ -76,7 +79,7 @@ private:
/// Use the Pimpl idiom to hide the internals. /// Use the Pimpl idiom to hide the internals.
class Impl; class Impl;
/// The pointer never changes although *pimpl_'s contents may. /// The pointer never changes although *pimpl_'s contents may.
std::auto_ptr<Impl> const pimpl_; boost::scoped_ptr<Impl> const pimpl_;
}; };
} // namespace grfx } // namespace grfx

View File

@ -1,3 +1,8 @@
2002-06-26 Angus Leeming <leeming@lyx.org>
* insetgraphics.h: use boost::scoped_ptr in preference to
std::auto_ptr.
2002-06-26 Angus Leeming <leeming@lyx.org> 2002-06-26 Angus Leeming <leeming@lyx.org>
* insetgraphics.C: moved the image loading stuff into a new class * insetgraphics.C: moved the image loading stuff into a new class

View File

@ -25,8 +25,7 @@
// We need a signal here to hide an active dialog when we are deleted. // We need a signal here to hide an active dialog when we are deleted.
#include <boost/signals/signal0.hpp> #include <boost/signals/signal0.hpp>
#include <boost/signals/trackable.hpp> #include <boost/signals/trackable.hpp>
#include <boost/scoped_ptr.hpp>
#include <memory> // auto_ptr
class Dialogs; class Dialogs;
class LaTeXFeatures; class LaTeXFeatures;
@ -128,11 +127,8 @@ private:
/// The cached variables /// The cached variables
class Cache; class Cache;
friend class Cache; friend class Cache;
/** Can change the contents of the cache, but not the pointer. /// The pointer never changes although *cache_'s contents may.
* Use std::auto_ptr not boost::scoped_ptr so we do not have to define boost::scoped_ptr<Cache> const cache_;
* Cache in advance.
*/
std::auto_ptr<Cache> const cache_;
}; };
#endif #endif