forked from mia/Aegisub
Switch to boost.container for containers of incomplete types
STL containers are not required to support incomplete types, and while most implementations do, clang's libc++ does not.
This commit is contained in:
parent
dfa4f33f25
commit
28175aadbe
11 changed files with 26 additions and 21 deletions
|
@ -20,7 +20,6 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <map>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -19,13 +19,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef LAGI_PRE
|
#ifndef LAGI_PRE
|
||||||
|
#include <boost/container/map.hpp>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <map>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#else
|
#else
|
||||||
#include <tr1/functional>
|
#include <tr1/functional>
|
||||||
#include <map>
|
|
||||||
#include <tr1/memory>
|
#include <tr1/memory>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -141,7 +141,7 @@ namespace detail {
|
||||||
template<class Slot>
|
template<class Slot>
|
||||||
class SignalBaseImpl : public SignalBase {
|
class SignalBaseImpl : public SignalBase {
|
||||||
protected:
|
protected:
|
||||||
typedef std::map<ConnectionToken*, Slot> SlotMap;
|
typedef boost::container::map<ConnectionToken*, Slot> SlotMap;
|
||||||
|
|
||||||
SlotMap slots; /// Signals currently connected to this slot
|
SlotMap slots; /// Signals currently connected to this slot
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,10 @@
|
||||||
#include <tr1/memory>
|
#include <tr1/memory>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Boost
|
||||||
|
#include <boost/container/list.hpp>
|
||||||
|
#include <boost/container/map.hpp>
|
||||||
|
|
||||||
#ifdef __DEPRECATED // Dodge GCC warnings
|
#ifdef __DEPRECATED // Dodge GCC warnings
|
||||||
# undef __DEPRECATED
|
# undef __DEPRECATED
|
||||||
# include <strstream>
|
# include <strstream>
|
||||||
|
|
|
@ -33,7 +33,8 @@
|
||||||
///
|
///
|
||||||
|
|
||||||
#ifndef AGI_PRE
|
#ifndef AGI_PRE
|
||||||
#include <list>
|
#include <boost/container/list.hpp>
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -55,8 +56,8 @@ typedef std::list<AssEntry*>::iterator entryIter;
|
||||||
///
|
///
|
||||||
/// DOCME
|
/// DOCME
|
||||||
class AssFile {
|
class AssFile {
|
||||||
std::list<AssFile> UndoStack;
|
boost::container::list<AssFile> UndoStack;
|
||||||
std::list<AssFile> RedoStack;
|
boost::container::list<AssFile> RedoStack;
|
||||||
wxString undoDescription;
|
wxString undoDescription;
|
||||||
/// Revision counter for undo coalescing and modified state tracking
|
/// Revision counter for undo coalescing and modified state tracking
|
||||||
int commitId;
|
int commitId;
|
||||||
|
|
|
@ -33,7 +33,8 @@
|
||||||
///
|
///
|
||||||
|
|
||||||
#ifndef AGI_PRE
|
#ifndef AGI_PRE
|
||||||
#include <map>
|
#include <boost/container/map.hpp>
|
||||||
|
|
||||||
#include <tr1/memory>
|
#include <tr1/memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -45,7 +46,7 @@ struct OpenGLTextGlyph;
|
||||||
class OpenGLTextTexture;
|
class OpenGLTextTexture;
|
||||||
|
|
||||||
/// DOCME
|
/// DOCME
|
||||||
typedef std::map<int,OpenGLTextGlyph> glyphMap;
|
typedef boost::container::map<int,OpenGLTextGlyph> glyphMap;
|
||||||
|
|
||||||
/// DOCME
|
/// DOCME
|
||||||
/// @class OpenGLText
|
/// @class OpenGLText
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
#ifndef AGI_PRE
|
#ifndef AGI_PRE
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <map>
|
#include <boost/container/map.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <wx/panel.h>
|
#include <wx/panel.h>
|
||||||
|
@ -136,7 +136,7 @@ class SubsEditBox : public wxPanel {
|
||||||
/// The start and end times of the selected lines without changes made to
|
/// The start and end times of the selected lines without changes made to
|
||||||
/// avoid negative durations, so that they can be restored if future changes
|
/// avoid negative durations, so that they can be restored if future changes
|
||||||
/// eliminate the negative durations
|
/// eliminate the negative durations
|
||||||
std::map<AssDialogue *, std::pair<AssTime, AssTime> > initialTimes;
|
boost::container::map<AssDialogue *, std::pair<AssTime, AssTime> > initialTimes;
|
||||||
|
|
||||||
// Constructor helpers
|
// Constructor helpers
|
||||||
wxTextCtrl *MakeMarginCtrl(wxString const& tooltip, void (SubsEditBox::*handler)(wxCommandEvent&));
|
wxTextCtrl *MakeMarginCtrl(wxString const& tooltip, void (SubsEditBox::*handler)(wxCommandEvent&));
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
///
|
///
|
||||||
|
|
||||||
#ifndef AGI_PRE
|
#ifndef AGI_PRE
|
||||||
#include <list>
|
#include <boost/container/list.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct ToolTipBinding;
|
struct ToolTipBinding;
|
||||||
|
@ -52,7 +52,7 @@ class ToolTipManager {
|
||||||
ToolTipManager(ToolTipManager const&);
|
ToolTipManager(ToolTipManager const&);
|
||||||
ToolTipManager& operator=(ToolTipManager const&);
|
ToolTipManager& operator=(ToolTipManager const&);
|
||||||
|
|
||||||
std::list<ToolTipBinding> tips;
|
boost::container::list<ToolTipBinding> tips;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static void Bind(wxWindow *window, wxString tooltip, const char *context, const char *command);
|
static void Bind(wxWindow *window, wxString tooltip, const char *context, const char *command);
|
||||||
|
|
|
@ -63,7 +63,7 @@ const AegiVideoFrame VideoProviderCache::GetFrame(int n) {
|
||||||
size_t total_size = 0;
|
size_t total_size = 0;
|
||||||
|
|
||||||
// See if frame is cached
|
// See if frame is cached
|
||||||
for (std::list<CachedFrame>::iterator cur = cache.begin(); cur != cache.end(); ++cur) {
|
for (boost::container::list<CachedFrame>::iterator cur = cache.begin(); cur != cache.end(); ++cur) {
|
||||||
if (cur->frame_number == n) {
|
if (cur->frame_number == n) {
|
||||||
cache.push_front(*cur);
|
cache.push_front(*cur);
|
||||||
cache.erase(cur);
|
cache.erase(cur);
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
///
|
///
|
||||||
|
|
||||||
#ifndef AGI_PRE
|
#ifndef AGI_PRE
|
||||||
#include <list>
|
#include <boost/container/list.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "include/aegisub/video_provider.h"
|
#include "include/aegisub/video_provider.h"
|
||||||
|
@ -55,7 +55,7 @@ class VideoProviderCache : public VideoProvider {
|
||||||
const size_t max_cache_size;
|
const size_t max_cache_size;
|
||||||
|
|
||||||
/// Cache of video frames with the most recently used ones at the front
|
/// Cache of video frames with the most recently used ones at the front
|
||||||
std::list<CachedFrame> cache;
|
boost::container::list<CachedFrame> cache;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VideoProviderCache(VideoProvider *master);
|
VideoProviderCache(VideoProvider *master);
|
||||||
|
|
|
@ -161,8 +161,8 @@ template<class FeatureType>
|
||||||
class VisualTool : public VisualToolBase {
|
class VisualTool : public VisualToolBase {
|
||||||
protected:
|
protected:
|
||||||
typedef FeatureType Feature;
|
typedef FeatureType Feature;
|
||||||
typedef typename std::list<FeatureType>::iterator feature_iterator;
|
typedef typename boost::container::list<FeatureType>::iterator feature_iterator;
|
||||||
typedef typename std::list<FeatureType>::const_iterator feature_const_iterator;
|
typedef typename boost::container::list<FeatureType>::const_iterator feature_const_iterator;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct ltaddr {
|
struct ltaddr {
|
||||||
|
@ -172,7 +172,7 @@ private:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
std::list<agi::signal::Connection> slots;
|
boost::container::list<agi::signal::Connection> slots;
|
||||||
|
|
||||||
typedef typename std::set<feature_iterator, ltaddr>::iterator selection_iterator;
|
typedef typename std::set<feature_iterator, ltaddr>::iterator selection_iterator;
|
||||||
|
|
||||||
|
@ -203,7 +203,7 @@ protected:
|
||||||
feature_iterator active_feature;
|
feature_iterator active_feature;
|
||||||
/// List of features which are drawn and can be clicked on
|
/// List of features which are drawn and can be clicked on
|
||||||
/// List is used here for the iterator invalidation properties
|
/// List is used here for the iterator invalidation properties
|
||||||
std::list<FeatureType> features;
|
boost::container::list<FeatureType> features;
|
||||||
|
|
||||||
/// Draw all of the features in the list
|
/// Draw all of the features in the list
|
||||||
void DrawAllFeatures();
|
void DrawAllFeatures();
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
class VisualToolDragDraggableFeature : public VisualDraggableFeature {
|
class VisualToolDragDraggableFeature : public VisualDraggableFeature {
|
||||||
public:
|
public:
|
||||||
int time;
|
int time;
|
||||||
std::list<VisualToolDragDraggableFeature>::iterator parent;
|
boost::container::list<VisualToolDragDraggableFeature>::iterator parent;
|
||||||
VisualToolDragDraggableFeature() : VisualDraggableFeature(), time(0) { }
|
VisualToolDragDraggableFeature() : VisualDraggableFeature(), time(0) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue