Change most uses of deques to vectors
This commit is contained in:
parent
20a7ec786f
commit
8ec9280ecc
7 changed files with 15 additions and 18 deletions
|
@ -9,14 +9,13 @@ Author: Terry Caton
|
|||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <deque>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
namespace json
|
||||
{
|
||||
namespace json {
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// forward declarations (more info further below)
|
||||
|
@ -28,7 +27,7 @@ typedef int64_t Integer;
|
|||
typedef double Double;
|
||||
typedef bool Boolean;
|
||||
typedef std::string String;
|
||||
typedef std::deque<UnknownElement> Array;
|
||||
typedef std::vector<UnknownElement> Array;
|
||||
typedef std::map<std::string, UnknownElement> Object;
|
||||
|
||||
struct Null;
|
||||
|
|
|
@ -17,16 +17,16 @@
|
|||
/// @ingroup libaegisub
|
||||
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <deque>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include <libaegisub/exception.h>
|
||||
#include <libaegisub/fs_fwd.h>
|
||||
|
||||
namespace json {
|
||||
class UnknownElement;
|
||||
typedef std::deque<UnknownElement> Array;
|
||||
typedef std::vector<UnknownElement> Array;
|
||||
}
|
||||
|
||||
namespace agi {
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <deque>
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
#include <list>
|
||||
|
|
|
@ -107,7 +107,7 @@ void AsyncVideoProvider::UpdateSubtitles(const AssFile *new_subs, std::set<const
|
|||
|
||||
// Copy just the lines which were changed, then replace the lines at the
|
||||
// same indices in the worker's copy of the file with the new entries
|
||||
std::deque<std::pair<size_t, AssDialogue*>> changed;
|
||||
std::vector<std::pair<size_t, AssDialogue*>> changed;
|
||||
size_t i = 0;
|
||||
for (auto const& e : new_subs->Events) {
|
||||
if (changes.count(&e))
|
||||
|
|
|
@ -315,7 +315,7 @@ void DialogShiftTimes::SaveHistory(json::Array const& shifted_blocks) {
|
|||
new_entry["mode"] = selection_mode->GetSelection();
|
||||
new_entry["selection"] = shifted_blocks;
|
||||
|
||||
history.push_front(new_entry);
|
||||
history.insert(history.begin(), new_entry);
|
||||
if (history.size() > 50)
|
||||
history.resize(50);
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <boost/range/algorithm_ext/push_back.hpp>
|
||||
#include <deque>
|
||||
#include <vector>
|
||||
#include <wx/app.h>
|
||||
#include <wx/frame.h>
|
||||
|
@ -114,13 +113,13 @@ public:
|
|||
/// handlers makes everything involves events unusably slow.
|
||||
class CommandManager {
|
||||
/// Menu items which need to do something on menu open
|
||||
std::deque<std::pair<std::string, wxMenuItem*>> dynamic_items;
|
||||
std::vector<std::pair<std::string, wxMenuItem*>> dynamic_items;
|
||||
/// Menu items which need to be updated only when hotkeys change
|
||||
std::deque<std::pair<std::string, wxMenuItem*>> static_items;
|
||||
std::vector<std::pair<std::string, wxMenuItem*>> static_items;
|
||||
/// window id -> command map
|
||||
std::vector<std::string> items;
|
||||
/// MRU menus which need to be updated on menu open
|
||||
std::deque<MruMenu*> mru;
|
||||
std::vector<MruMenu*> mru;
|
||||
|
||||
/// Project context
|
||||
agi::Context *context;
|
||||
|
|
|
@ -17,15 +17,15 @@
|
|||
/// @see preferences.cpp
|
||||
/// @ingroup configuration_ui
|
||||
|
||||
#include <deque>
|
||||
#include <libaegisub/exception.h>
|
||||
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <wx/dialog.h>
|
||||
|
||||
#include <libaegisub/exception.h>
|
||||
|
||||
class wxButton;
|
||||
class wxTreebook;
|
||||
namespace agi { class OptionValue; }
|
||||
|
@ -42,8 +42,8 @@ private:
|
|||
wxButton *applyButton;
|
||||
|
||||
std::map<std::string, std::unique_ptr<agi::OptionValue>> pending_changes;
|
||||
std::deque<Thunk> pending_callbacks;
|
||||
std::deque<std::string> option_names;
|
||||
std::vector<Thunk> pending_callbacks;
|
||||
std::vector<std::string> option_names;
|
||||
|
||||
void OnOK(wxCommandEvent &);
|
||||
void OnCancel(wxCommandEvent &);
|
||||
|
|
Loading…
Reference in a new issue