mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-05 17:44:55 -06:00
ide: fixed for previous ambiguity fix, some r-value fixes (thanks Novo!)
git-svn-id: svn://ultimatepp.org/upp/trunk@9923 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
90d475e205
commit
4ec342f812
9 changed files with 19 additions and 20 deletions
|
|
@ -29,8 +29,8 @@ public:
|
|||
T& AddTail() { return *new(AddTail0()) T; }
|
||||
void AddHead(const T& x) { new(AddHead0()) T(x); }
|
||||
void AddTail(const T& x) { new(AddTail0()) T(x); }
|
||||
void AddHead(T&& x) { new(AddHead0()) T(x); }
|
||||
void AddTail(T&& x) { new(AddTail0()) T(x); }
|
||||
void AddHead(T&& x) { new(AddHead0()) T(pick(x)); }
|
||||
void AddTail(T&& x) { new(AddTail0()) T(pick(x)); }
|
||||
T& Head() { ASSERT(items > 0); return vector[start]; }
|
||||
T& Tail() { ASSERT(items > 0); return vector[EI()]; }
|
||||
const T& Head() const { ASSERT(items > 0); return vector[start]; }
|
||||
|
|
@ -79,8 +79,8 @@ public:
|
|||
UPP::Swap(a.alloc, b.alloc); }
|
||||
|
||||
#ifdef DEPRECATED
|
||||
void AddHeadPick(T&& x) { new(AddHead0()) T(x); }
|
||||
void AddTailPick(T&& x) { new(AddTail0()) T(x); }
|
||||
void AddHeadPick(T&& x) { new(AddHead0()) T(pick(x)); }
|
||||
void AddTailPick(T&& x) { new(AddTail0()) T(pick(x)); }
|
||||
ConstIterator GetIter(int pos) const { return ConstIterator(*this, pos); }
|
||||
Iterator GetIter(int pos) { return Iterator(*this, pos); }
|
||||
typedef T ValueType;
|
||||
|
|
@ -155,8 +155,8 @@ public:
|
|||
friend void Swap(BiArray& a, BiArray& b) { UPP::Swap(a.bv, b.bv); }
|
||||
|
||||
#ifdef DEPRECATED
|
||||
void AddHeadPick(T&& x) { bv.AddHead(new T(x)); }
|
||||
void AddTailPick(T&& x) { bv.AddTail(new T(x)); }
|
||||
void AddHeadPick(T&& x) { bv.AddHead(new T(pick(x))); }
|
||||
void AddTailPick(T&& x) { bv.AddTail(new T(pick(x))); }
|
||||
ConstIterator GetIter(int pos) const { return ConstIterator(*this, pos); }
|
||||
Iterator GetIter(int pos) { return Iterator(*this, pos); }
|
||||
typedef T ValueType;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public:
|
|||
Event(const Event& src) : fn(src.fn) {}
|
||||
Event& operator=(const Event& src) { fn = src.fn; return *this; }
|
||||
|
||||
Event(Fn&& src, int) : fn(src) {} // Helper for callback compatibility code
|
||||
Event(Fn&& src, int) : fn(pick(src)) {} // Helper for callback compatibility code
|
||||
template <class F>
|
||||
Event(F src, int) : fn(src) {} // Helper for callback compatibility code
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ public:
|
|||
EventGate(const EventGate& a) : fn(a.fn) {}
|
||||
EventGate& operator=(const EventGate& a) { fn = a.fn; return *this; }
|
||||
|
||||
EventGate(Fn&& src, int) : fn(src) {}
|
||||
EventGate(Fn&& src, int) : fn(pick(src)) {}
|
||||
EventGate& operator=(EventGate&& a) { fn = pick(a.fn); return *this; }
|
||||
|
||||
EventGate(CNULLer) {}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public:
|
|||
|
||||
CoWork& operator&(const Callback& cb) { Do(cb); return *this; }
|
||||
CoWork& operator&(const Function<void ()>& fn) { Do(fn); return *this; }
|
||||
CoWork& operator&(Function<void ()>&& fn) { Do(fn); return *this; }
|
||||
CoWork& operator&(Function<void ()>&& fn) { Do(pick(fn)); return *this; }
|
||||
|
||||
void Pipe(int stepi, Function<void ()>&& lambda);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ protected:
|
|||
|
||||
public:
|
||||
T& Add(const K& k, const T& x) { key.Add(k); return value.Add(x); }
|
||||
T& AddPick(const K& k, T&& x) { key.Add(k); return value.AddPick(x); }
|
||||
T& AddPick(const K& k, T&& x) { key.Add(k); return value.AddPick(pick(x)); }
|
||||
T& Add(const K& k) { key.Add(k); return value.Add(); }
|
||||
|
||||
void Finish() { IndexSort(key, value, Less()); Shrink(); }
|
||||
|
|
@ -52,7 +52,7 @@ public:
|
|||
|
||||
FixedAMap() {}
|
||||
FixedAMap(const FixedAMap& s, int) : key(s.key, 0), value(s.value, 0) {}
|
||||
FixedAMap(Vector<K>&& key, V&& val) : key(key), value(val) {}
|
||||
FixedAMap(Vector<K>&& key, V&& val) : key(pick(key)), value(val) {}
|
||||
|
||||
typedef ConstIteratorOf<V> ConstIterator;
|
||||
typedef IteratorOf<V> Iterator;
|
||||
|
|
@ -85,7 +85,7 @@ class FixedVectorMap : public MoveableAndDeepCopyOption<FixedVectorMap<K, T, Les
|
|||
typedef FixedAMap< K, T, Vector<T>, Less > B;
|
||||
public:
|
||||
FixedVectorMap(const FixedVectorMap& s, int) : FixedAMap<K, T, Vector<T>, Less>(s, 1) {}
|
||||
FixedVectorMap(Vector<K>&& key, Vector<T>&& val) : FixedAMap<K, T, Vector<T>, Less>(key, val) {}
|
||||
FixedVectorMap(Vector<K>&& key, Vector<T>&& val) : FixedAMap<K, T, Vector<T>, Less>(pick(key), pick(val)) {}
|
||||
FixedVectorMap() {}
|
||||
|
||||
friend void Swap(FixedVectorMap& a, FixedVectorMap& b) { a.B::Swap(b); }
|
||||
|
|
@ -107,7 +107,7 @@ public:
|
|||
TT& Create(const K& k, Args... args) { TT *q = new TT(args...); B::key.Add(k); return static_cast<TT&>(B::value.Add(q)); }
|
||||
|
||||
FixedArrayMap(const FixedArrayMap& s, int) : FixedAMap<K, T, Array<T>, Less>(s, 1) {}
|
||||
FixedArrayMap(Vector<K>&& ndx, Array<T>&& val) : FixedAMap<K, T, Array<T>, Less>(ndx, val) {}
|
||||
FixedArrayMap(Vector<K>&& ndx, Array<T>&& val) : FixedAMap<K, T, Array<T>, Less>(pick(ndx), pick(val)) {}
|
||||
FixedArrayMap() {}
|
||||
|
||||
friend void Swap(FixedArrayMap& a, FixedArrayMap& b) { a.B::Swap(b); }
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ public:
|
|||
void Clear();
|
||||
void Shrink();
|
||||
|
||||
Mitor(Mitor&& m) { Pick(m); }
|
||||
Mitor(Mitor&& m) { Pick(pick(m)); }
|
||||
void operator=(Mitor&& m) { if(this != &m) { Clear(); Pick(pick(m)); } }
|
||||
|
||||
Mitor(Mitor& m, int) { Copy(m); }
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ bool BaseSetupDlg::Run(String& vars)
|
|||
Vector<String> paths = SplitDirs(upp.GetText().ToString());
|
||||
for(int i = 0; i < paths.GetCount(); i++)
|
||||
RealizeDirectory(paths[i]);
|
||||
RealizeDirectory(output);
|
||||
RealizeDirectory(~output);
|
||||
vars = varname;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ void Ide::RunArgs() {
|
|||
dlg.utf8.Enable(rm != RUN_WINDOW);
|
||||
switch(dlg.Run()) {
|
||||
case IDOK:
|
||||
rundir = dlg.dir;
|
||||
rundir = ~dlg.dir;
|
||||
runarg = ~dlg.arg;
|
||||
runmode = ~dlg.runmode;
|
||||
runexternal = dlg.external;
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ void Ide::FindInFiles(bool replace) {
|
|||
WriteList(ff.find, d.find_list);
|
||||
WriteList(ff.replace, d.replace_list);
|
||||
ff.Sync();
|
||||
if(String(ff.folder).IsEmpty())
|
||||
if(IsNull(~ff.folder))
|
||||
ff.folder <<= GetUppDir();
|
||||
ff.style <<= STYLE_NO_REPLACE;
|
||||
ff.Sync();
|
||||
|
|
@ -278,8 +278,7 @@ void Ide::FindInFiles(bool replace) {
|
|||
~ff.files, ~ff.readonly, pi);
|
||||
}
|
||||
else
|
||||
SearchForFiles(files, NormalizePath((String)ff.folder, GetUppDir()),
|
||||
~ff.files, ~ff.readonly, pi);
|
||||
SearchForFiles(files, NormalizePath(~~ff.folder, GetUppDir()), ~ff.files, ~ff.readonly, pi);
|
||||
if(!pi.Canceled()) {
|
||||
String pattern;
|
||||
RegExp rx, *regexp = NULL;
|
||||
|
|
|
|||
|
|
@ -595,7 +595,7 @@ void MainConfigDlg::FlagDlg()
|
|||
WithConfLayout<TopWindow> cfg;
|
||||
CtrlLayoutOKCancel(cfg, "Configuration flags");
|
||||
cfg.Sizeable().MaximizeBox();
|
||||
Vector<String> flg = SplitFlags0(String(fe));
|
||||
Vector<String> flg = SplitFlags0(~~fe);
|
||||
Vector<String> accepts = wspc.GetAllAccepts(0);
|
||||
Sort(accepts, GetLanguageInfo());
|
||||
enum { CC_SET, CC_NAME, CC_PACKAGES, CC_COUNT };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue