Remove scoped_ptr::swap

Originally committed to SVN as r6431.
This commit is contained in:
Thomas Goyne 2012-02-02 19:18:10 +00:00
parent d68a7e81b0
commit b8a7c6cb1e
6 changed files with 13 additions and 12 deletions

View file

@ -24,6 +24,10 @@
#include "libaegisub/io.h"
#include "libaegisub/line_iterator.h"
#ifndef LAGI_PRE
#include <cstdlib>
#endif
template<class String, class Char, class Container>
static void split(String const& str, Char sep, Container *out) {
typename String::size_type pos, prev = 0;

View file

@ -20,10 +20,6 @@
#pragma once
#ifndef LAGI_PRE
#include <algorithm>
#endif
namespace agi {
/// @class scoped_ptr
@ -48,14 +44,8 @@ public:
ptr = p;
}
void swap(scoped_ptr &b) { using std::swap; swap(ptr, b.ptr); }
explicit scoped_ptr(T *ptr = 0) : ptr(ptr){ }
~scoped_ptr() { delete ptr; }
};
template<class T>
inline void swap(scoped_ptr<T> &a, scoped_ptr<T> &b) {
a.swap(b);
}
}

View file

@ -28,6 +28,8 @@
#ifndef AGI_PRE
#include <vector>
#include <wx/string.h>
#endif
class AudioMarkerKeyframe;
@ -35,14 +37,15 @@ class Pen;
class VideoContext;
class TimeRange;
class VideoPositionMarker;
#include "time_range.h"
class wxPen;
namespace agi {
class OptionValue;
struct Context;
}
#include "time_range.h"
/// @class AudioMarker
/// @brief A marker on the audio display
class AudioMarker {

View file

@ -26,6 +26,8 @@
#include "dialog_selection.h"
#ifndef AGI_PRE
#include <algorithm>
#include <wx/checkbox.h>
#include <wx/combobox.h>
#include <wx/msgdlg.h>

View file

@ -38,6 +38,7 @@
#include <wx/dataview.h>
#include <wx/regex.h>
#include <algorithm>
#include <list>
#include <set>
#endif

View file

@ -37,6 +37,7 @@
#include <libaegisub/log.h>
#ifndef AGI_PRE
#include <algorithm>
#include <deque>
#include <sstream>
#include <vector>