clean-up: trifles

This commit is contained in:
Fischlurch 2025-06-07 23:59:57 +02:00
parent 20392eee1c
commit d888891d84
481 changed files with 1987 additions and 1992 deletions

View file

@ -90,8 +90,7 @@ reconfiguration driven by user interactions:
Conclusions for the Design Conclusions for the Design
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
Based on these observations, the following design would appear to be pretty much Based on these observations, the following design would appear to be pretty much obvious:
obvious:
The overall player subsystem can be described as ``play/render-this''-service. The overall player subsystem can be described as ``play/render-this''-service.
Given a suitable (high-level) object, the player has the ability to ``perform'' Given a suitable (high-level) object, the player has the ability to ``perform''

View file

@ -30,7 +30,7 @@ To give a delineation to the other side, a constantly growing project might even
reach the point where the actual coding of new functionality makes up less than 25% reach the point where the actual coding of new functionality makes up less than 25%
of the overall work required. More people might be involved than anyone can recall or of the overall work required. More people might be involved than anyone can recall or
overlook reasonably. A code size of 1 Million LoC seems to exceed any kind of sufficiently overlook reasonably. A code size of 1 Million LoC seems to exceed any kind of sufficiently
precise imagination. From that point on, a rigorosely formalsed organisation is vital precise imagination. From that point on, a rigorously formalised organisation is vital
to keep such a *large scale project* from floundering. to keep such a *large scale project* from floundering.
//// ////

View file

@ -220,13 +220,13 @@ namespace advice {
{ {
Lock sync{this}; Lock sync{this};
if (!previousProvision && newProvision) if (not previousProvision and newProvision)
index_.addProvision (*newProvision); index_.addProvision (*newProvision);
else else
if (previousProvision && newProvision) if (previousProvision and newProvision)
index_.modifyProvision (*previousProvision, *newProvision); index_.modifyProvision (*previousProvision, *newProvision);
else else
if (previousProvision && !newProvision) if (previousProvision and not newProvision)
index_.removeProvision (*previousProvision); index_.removeProvision (*previousProvision);
discardEntry (unConst(previousProvision)); discardEntry (unConst(previousProvision));

View file

@ -91,7 +91,7 @@ namespace advice {
} }
if ( end_of_last_match !=def.end() if ( end_of_last_match !=def.end()
&& *end_of_last_match !='.' and *end_of_last_match !='.'
) // if the match did *not stop at the end of the pattern definition list ) // if the match did *not stop at the end of the pattern definition list
throw lumiera::error::Invalid ("Trailing garbage in binding pattern definition" ///////////////TICKET #197 should include the garbage, i.e. where the parsing stops throw lumiera::error::Invalid ("Trailing garbage in binding pattern definition" ///////////////TICKET #197 should include the garbage, i.e. where the parsing stops
, LUMIERA_ERROR_BINDING_PATTERN_SYNTAX); , LUMIERA_ERROR_BINDING_PATTERN_SYNTAX);

View file

@ -125,8 +125,8 @@ namespace advice {
identical (Atom const& oa) const identical (Atom const& oa) const
{ {
return ari_ == oa.ari_ return ari_ == oa.ari_
&& sym_ == oa.sym_ and sym_ == oa.sym_
&& arg_ == oa.arg_; and arg_ == oa.arg_;
} }
int int

View file

@ -569,7 +569,7 @@ namespace advice {
verify_Entry (e,hash); verify_Entry (e,hash);
POA& request = *(e.second); POA& request = *(e.second);
const POA* solution (request.getSolution()); const POA* solution (request.getSolution());
if (solution && hasProvision(*solution)) if (solution and hasProvision (*solution))
{ {
POA* currentSolution = provisionEntries_[hash].find_latest_solution (request); POA* currentSolution = provisionEntries_[hash].find_latest_solution (request);
VERIFY (e.first.matches (solution->getMatcher()),"stored advice solution not supported by binding match"); VERIFY (e.first.matches (solution->getMatcher()),"stored advice solution not supported by binding match");

View file

@ -189,14 +189,14 @@ namespace lumiera {
operator< (Goal::QueryID const& id1, Goal::QueryID const& id2) operator< (Goal::QueryID const& id1, Goal::QueryID const& id2)
{ {
return id1.kind < id2.kind return id1.kind < id2.kind
||(id1.kind == id2.kind && id1.type < id2.type); or(id1.kind == id2.kind and id1.type < id2.type);
} }
inline bool inline bool
operator== (Goal::QueryID const& id1, Goal::QueryID const& id2) operator== (Goal::QueryID const& id1, Goal::QueryID const& id2)
{ {
return id1.kind == id2.kind return id1.kind == id2.kind
&& id1.type == id2.type; and id1.type == id2.type;
} }
inline bool inline bool
@ -448,8 +448,8 @@ namespace lumiera {
uint d1 = q1.degree(); uint d1 = q1.degree();
uint d2 = q2.degree(); uint d2 = q2.degree();
return d1 < d2 return d1 < d2
||(d1 == d2 && ( q1.def_ < q2.def_ or(d1 == d2 and ( q1.def_ < q2.def_
||(q1.def_ == q2.def_ && q1.id_ < q2.id_))); or (q1.def_ == q2.def_ and q1.id_ < q2.id_)));
} }
friend bool friend bool
@ -553,7 +553,6 @@ namespace lumiera {
this->predicateForm_ = queryPredicates; this->predicateForm_ = queryPredicates;
return *this; return *this;
} }
}; };
@ -611,7 +610,5 @@ namespace lumiera {
} // namespace lumiera } // namespace lumiera
#endif #endif

View file

@ -109,7 +109,7 @@ namespace query {
operator() (Record const& rec) operator() (Record const& rec)
{ {
P<TAR> storedObj (rec.objRef.lock()); P<TAR> storedObj (rec.objRef.lock());
return storedObj && (storedObj == obj_); return storedObj and (storedObj == obj_);
} }
}; };
@ -140,12 +140,12 @@ namespace query {
static Registry& static Registry&
access (Table& table) access (Table& table)
{ {
if ( !index if ( not index
|| index > table.size() or index > table.size()
||!table[index-1]) or not table[index-1])
createSlot (table); createSlot (table);
ASSERT (0 < index && index<=table.size() && table[index-1]); ASSERT (0 < index and index<=table.size() and table[index-1]);
Slot* item = static_cast<Slot*> (table[index-1].get()); Slot* item = static_cast<Slot*> (table[index-1].get());
return item->registry; return item->registry;
} }
@ -227,7 +227,7 @@ namespace query {
public: public:
P<TAR> operator* () { return ptr; } P<TAR> operator* () { return ptr; }
bool hasNext () { return next || findNext(); } bool hasNext () { return next or findNext(); }
Iter& operator++ () Iter& operator++ ()
{ {
ptr=findNext(); ptr=findNext();
@ -282,8 +282,8 @@ namespace query {
Registry& registry = Slot<TAR>::access(table_); Registry& registry = Slot<TAR>::access(table_);
RIter pos = registry.lower_bound (entry); RIter pos = registry.lower_bound (entry);
if ( pos!=registry.end() if (pos!=registry.end() and
&& pos->queryKey == query) pos->queryKey == query)
{ {
P<TAR> storedObj (pos->objRef.lock()); P<TAR> storedObj (pos->objRef.lock());
if (storedObj) if (storedObj)

View file

@ -34,6 +34,7 @@
** values, references and pointers-to-const are supported as well. ** values, references and pointers-to-const are supported as well.
** **
** @see lib::InPlaceAnyHolder usage example to access a subclass in embedded storage ** @see lib::InPlaceAnyHolder usage example to access a subclass in embedded storage
** @warning to state the obvious usage of such a facility raises questions...
** **
*/ */

View file

@ -192,7 +192,7 @@ namespace diff{
MATCH_STRING (bool) MATCH_STRING (bool)
virtual bool handle (string const& str) override { return str == txt_; } virtual bool handle (string const& str) override { return str == txt_; }
virtual bool handle (char const& c ) override { return 1 == txt_.length() && txt_.front() == c; } virtual bool handle (char const& c ) override { return 1 == txt_.length() and txt_.front() == c; }
public: public:
MatchString(string const& text) MatchString(string const& text)
@ -237,7 +237,7 @@ namespace diff{
DataCap::matchBool (bool b) const DataCap::matchBool (bool b) const
{ {
bool* val = unConst(this)->maybeGet<bool>(); bool* val = unConst(this)->maybeGet<bool>();
return val && (b == *val); return val and (b == *val);
} }
@ -245,7 +245,7 @@ namespace diff{
DataCap::matchLuid (LuidH hash) const DataCap::matchLuid (LuidH hash) const
{ {
LuidH* val = unConst(this)->maybeGet<LuidH>(); LuidH* val = unConst(this)->maybeGet<LuidH>();
return val && (hash == *val); return val and (hash == *val);
} }
@ -257,7 +257,7 @@ namespace diff{
else else
{ {
RecRef* val = unConst(this)->maybeGet<RecRef>(); RecRef* val = unConst(this)->maybeGet<RecRef>();
return val && val->empty(); return val and val->empty();
} }
} }
@ -271,7 +271,7 @@ namespace diff{
RecRef* r = unConst(this)->maybeGet<RecRef>(); RecRef* r = unConst(this)->maybeGet<RecRef>();
if (r) val = r->get(); if (r) val = r->get();
} }
return val && (rec == *val); return val and (rec == *val);
} }

View file

@ -416,7 +416,7 @@ namespace diff{
operator== (GenNode const& n1, GenNode const& n2) operator== (GenNode const& n1, GenNode const& n2)
{ {
return n1.idi == n2.idi return n1.idi == n2.idi
&& n1.data.matchData(n2.data); and n1.data.matchData(n2.data);
} }
friend bool friend bool
@ -640,9 +640,9 @@ namespace diff{
operator== (ScopeExplorer const& s1, ScopeExplorer const& s2) operator== (ScopeExplorer const& s1, ScopeExplorer const& s2)
{ {
return not s1.scopes_.empty() return not s1.scopes_.empty()
&& not s2.scopes_.empty() and not s2.scopes_.empty()
&& s1.scopes_.size() == s2.scopes_.size() and s1.scopes_.size() == s2.scopes_.size()
&& s1.yield() == s2.yield(); and s1.yield() == s2.yield();
} }
}; };

View file

@ -179,7 +179,7 @@ namespace diff{
{ {
auto p = std::begin(con); auto p = std::begin(con);
auto e = std::end(con); auto e = std::end(con);
for ( ; p!=e && isAttribute(*p); ++p) for ( ; p!=e and isAttribute(*p); ++p)
if (isTypeID (*p)) if (isTypeID (*p))
type_ = extractTypeID(*p); type_ = extractTypeID(*p);
else else
@ -340,13 +340,13 @@ namespace diff{
{ {
REQUIRE (src); REQUIRE (src);
static const ElmIter END; static const ElmIter END;
if (pos != END && pos == src->attribs_.end() && !src->children_.empty()) if (pos != END and pos == src->attribs_.end() and not src->children_.empty())
{ {
pos = src->children_.begin(); pos = src->children_.begin();
return true; return true;
} }
else else
if (pos != END && (pos != src->children_.end())) if (pos != END and (pos != src->children_.end()))
return true; return true;
else else
{ {
@ -756,7 +756,7 @@ namespace diff{
Record<string>::isTypeID (string const& v) Record<string>::isTypeID (string const& v)
{ {
return isAttribute(v) return isAttribute(v)
&& "type" == extractKey(v); and "type" == extractKey(v);
} }
template<> template<>

View file

@ -351,8 +351,8 @@ namespace wrapper {
inline bool inline bool
operator== (ItemWrapper<TY> const& w1, ItemWrapper<TY> const& w2) operator== (ItemWrapper<TY> const& w1, ItemWrapper<TY> const& w2)
{ {
return (!w1 && !w2) return (!w1 and !w2)
|| ( w1 && w2 && (*w1)==(*w2)); or ( w1 and w2 and (*w1)==(*w2));
} }
template<typename TY> template<typename TY>
inline bool inline bool

View file

@ -220,7 +220,7 @@ namespace lib {
template<class IT> template<class IT>
class AddressExposingIter class AddressExposingIter
{ {
typedef typename IT::pointer _Ptr; using _Ptr = typename IT::pointer;
IT i_; ///< nested source iterator IT i_; ///< nested source iterator
@ -238,9 +238,9 @@ namespace lib {
public: public:
typedef typename IT::pointer const* pointer; using pointer = typename IT::pointer const*;
typedef typename IT::pointer const& reference; using reference = typename IT::pointer const&;
typedef typename IT::pointer const value_type; using value_type = typename IT::pointer const ;
ENABLE_USE_IN_STD_RANGE_FOR_LOOPS (AddressExposingIter); ENABLE_USE_IN_STD_RANGE_FOR_LOOPS (AddressExposingIter);

View file

@ -78,7 +78,7 @@ namespace iter_stl {
operator++() operator++()
{ {
do ++i_; do ++i_;
while (i_ && prev_ && *prev_ == *i_ ); while (i_ and prev_ and *prev_ == *i_ );
memorise(); memorise();
return *this; return *this;
} }
@ -96,9 +96,9 @@ namespace iter_stl {
template<typename DEF> template<typename DEF>
struct WrappedStlIter : DEF struct WrappedStlIter : DEF
{ {
typedef typename DEF::Iter Iter; using Iter = typename DEF::Iter;
typedef typename DEF::reference reference; using reference = typename DEF::reference;
typedef typename DEF::pointer pointer; using pointer = typename DEF::pointer;
WrappedStlIter() : i_() { } WrappedStlIter() : i_() { }
@ -185,33 +185,33 @@ namespace iter_stl {
template<class MAP> template<class MAP>
struct _MapTypeSelector struct _MapTypeSelector
{ {
typedef typename MAP::value_type::first_type Key; using Key = typename MAP::value_type::first_type;
typedef typename MAP::value_type::second_type Val; using Val = typename MAP::value_type::second_type;
typedef typename MAP::iterator Itr; using Itr = typename MAP::iterator;
}; };
template<class MAP> template<class MAP>
struct _MapTypeSelector<const MAP> struct _MapTypeSelector<const MAP>
{ {
typedef typename MAP::value_type::first_type Key; using Key = typename MAP::value_type::first_type;
typedef typename MAP::value_type::second_type const Val; using Val = typename MAP::value_type::second_type const;
typedef typename MAP::const_iterator Itr; using Itr = typename MAP::const_iterator;
}; };
/** helper to access the parts of the pair values correctly...*/ /** helper to access the parts of the pair values correctly...*/
template<class IT, typename SEL> template<class IT, typename SEL>
struct _MapSubSelector struct _MapSubSelector
{ {
typedef WrappedStlIter< Wrapped_PickKey<IT>> PickKey; using PickKey = WrappedStlIter< Wrapped_PickKey<IT>>;
typedef WrappedStlIter< Wrapped_PickVal<IT>> PickVal; using PickVal = WrappedStlIter< Wrapped_PickVal<IT>>;
}; };
/** especially for const iterators we need to use \c const& and \c const* */ /** especially for const iterators we need to use \c const& and \c const* */
template<class IT, typename SEL> template<class IT, typename SEL>
struct _MapSubSelector<IT, SEL const&> struct _MapSubSelector<IT, SEL const&>
{ {
typedef WrappedStlIter< Wrapped_PickKey<IT>> PickKey; // Key is always const for maps using PickKey = WrappedStlIter< Wrapped_PickKey<IT>>; // Key is always const for maps
typedef WrappedStlIter< Wrapped_PickConstVal<IT>> PickVal; using PickVal = WrappedStlIter< Wrapped_PickConstVal<IT>>;
}; };
@ -219,37 +219,37 @@ namespace iter_stl {
template<class MAP> template<class MAP>
struct _MapT struct _MapT
{ {
typedef typename _MapTypeSelector<MAP>::Key KeyType; using KeyType = typename _MapTypeSelector<MAP>::Key;
typedef typename _MapTypeSelector<MAP>::Val ValType; using ValType = typename _MapTypeSelector<MAP>::Val;
typedef typename _MapTypeSelector<MAP>::Itr EntryIter; using EntryIter = typename _MapTypeSelector<MAP>::Itr;
typedef typename EntryIter::reference DetectConst; using DetectConst = typename EntryIter::reference;
typedef typename _MapSubSelector<EntryIter,DetectConst>::PickKey PickKeyIter; using PickKeyIter = typename _MapSubSelector<EntryIter,DetectConst>::PickKey;
typedef typename _MapSubSelector<EntryIter,DetectConst>::PickVal PickValIter; using PickValIter = typename _MapSubSelector<EntryIter,DetectConst>::PickVal;
typedef RangeIter<PickKeyIter> KeyIter; using KeyIter = RangeIter<PickKeyIter>;
typedef RangeIter<PickValIter> ValIter; using ValIter = RangeIter<PickValIter>;
typedef DistinctIter<KeyIter> DistinctKeys; using DistinctKeys = DistinctIter<KeyIter>;
}; };
template<class IT> template<class IT>
struct _MapIterT struct _MapIterT
{ {
typedef IT EntryIter; using EntryIter = IT;
typedef typename EntryIter::value_type::first_type KeyType; using KeyType = typename EntryIter::value_type::first_type;
typedef typename EntryIter::value_type::second_type ValType; using ValType = typename EntryIter::value_type::second_type;
typedef typename EntryIter::reference DetectConst; using DetectConst = typename EntryIter::reference;
typedef typename _MapSubSelector<EntryIter,DetectConst>::PickKey PickKeyIter; using PickKeyIter = typename _MapSubSelector<EntryIter,DetectConst>::PickKey;
typedef typename _MapSubSelector<EntryIter,DetectConst>::PickVal PickValIter; using PickValIter = typename _MapSubSelector<EntryIter,DetectConst>::PickVal;
typedef RangeIter<PickKeyIter> KeyIter; using KeyIter = RangeIter<PickKeyIter>;
typedef RangeIter<PickValIter> ValIter; using ValIter = RangeIter<PickValIter>;
typedef DistinctIter<KeyIter> DistinctKeys; using DistinctKeys = DistinctIter<KeyIter>;
}; };
@ -257,19 +257,19 @@ namespace iter_stl {
template<class SEQ> template<class SEQ>
struct _SeqT struct _SeqT
{ {
typedef typename SEQ::iterator Iter; using Iter = typename SEQ::iterator;
typedef RangeIter<Iter> Range; using Range = RangeIter<Iter>;
typedef DistinctIter<Range> DistinctVals; using DistinctVals = DistinctIter<Range>;
typedef AddressExposingIter<Range> Addrs; using Addrs = AddressExposingIter<Range>;
}; };
template<class SEQ> template<class SEQ>
struct _SeqT<const SEQ> struct _SeqT<const SEQ>
{ {
typedef typename SEQ::const_iterator Iter; using Iter = typename SEQ::const_iterator;
typedef RangeIter<Iter> Range; using Range = RangeIter<Iter>;
typedef DistinctIter<Range> DistinctVals; using DistinctVals = DistinctIter<Range>;
typedef AddressExposingIter<Range> Addrs; using Addrs = AddressExposingIter<Range>;
}; };
}//(End) traits/helpers }//(End) traits/helpers
@ -284,7 +284,7 @@ namespace iter_stl {
inline typename _SeqT<CON>::Range inline typename _SeqT<CON>::Range
eachElm (CON& coll) eachElm (CON& coll)
{ {
typedef typename _SeqT<CON>::Range Range; using Range = typename _SeqT<CON>::Range;
return Range (coll.begin(), coll.end()); return Range (coll.begin(), coll.end());
} }
@ -296,7 +296,7 @@ namespace iter_stl {
inline typename _SeqT<CON>::Addrs inline typename _SeqT<CON>::Addrs
eachAddress (CON& coll) eachAddress (CON& coll)
{ {
typedef typename _SeqT<CON>::Addrs Addresses; using Addresses = typename _SeqT<CON>::Addrs;
return Addresses (eachElm (coll)); return Addresses (eachElm (coll));
} }
@ -308,8 +308,8 @@ namespace iter_stl {
inline typename _MapT<MAP>::KeyIter inline typename _MapT<MAP>::KeyIter
eachKey (MAP& map) eachKey (MAP& map)
{ {
typedef typename _MapT<MAP>::KeyIter Range; using Range = typename _MapT<MAP>::KeyIter;
typedef typename _MapT<MAP>::PickKeyIter PickKey; using PickKey = typename _MapT<MAP>::PickKeyIter;
return Range (PickKey (map.begin()), PickKey (map.end())); return Range (PickKey (map.begin()), PickKey (map.end()));
} }
@ -322,8 +322,8 @@ namespace iter_stl {
inline typename _MapIterT<IT>::KeyIter inline typename _MapIterT<IT>::KeyIter
eachKey (IT const& begin, IT const& end) eachKey (IT const& begin, IT const& end)
{ {
typedef typename _MapIterT<IT>::KeyIter Range; using Range = typename _MapIterT<IT>::KeyIter;
typedef typename _MapIterT<IT>::PickKeyIter PickKey; using PickKey = typename _MapIterT<IT>::PickKeyIter;
return Range (PickKey (begin), PickKey (end)); return Range (PickKey (begin), PickKey (end));
} }
@ -336,8 +336,8 @@ namespace iter_stl {
inline typename _MapT<MAP>::ValIter inline typename _MapT<MAP>::ValIter
eachVal (MAP& map) eachVal (MAP& map)
{ {
typedef typename _MapT<MAP>::ValIter Range; using Range = typename _MapT<MAP>::ValIter;
typedef typename _MapT<MAP>::PickValIter PickVal; using PickVal = typename _MapT<MAP>::PickValIter;
return Range (PickVal (map.begin()), PickVal (map.end())); return Range (PickVal (map.begin()), PickVal (map.end()));
} }
@ -350,8 +350,8 @@ namespace iter_stl {
inline typename _MapIterT<IT>::ValIter inline typename _MapIterT<IT>::ValIter
eachVal (IT const& begin, IT const& end) eachVal (IT const& begin, IT const& end)
{ {
typedef typename _MapIterT<IT>::ValIter Range; using Range = typename _MapIterT<IT>::ValIter;
typedef typename _MapIterT<IT>::PickValIter PickVal; using PickVal = typename _MapIterT<IT>::PickValIter;
return Range (PickVal (begin), PickVal (end)); return Range (PickVal (begin), PickVal (end));
} }
@ -364,8 +364,8 @@ namespace iter_stl {
inline typename _SeqT<SEQ>::DistinctVals inline typename _SeqT<SEQ>::DistinctVals
eachDistinct (SEQ& seq) eachDistinct (SEQ& seq)
{ {
typedef typename _SeqT<SEQ>::Range Range; using Range = typename _SeqT<SEQ>::Range;
typedef typename _SeqT<SEQ>::DistinctVals DistinctValues; using DistinctValues = typename _SeqT<SEQ>::DistinctVals;
return DistinctValues (Range (seq.begin(), seq.end())); return DistinctValues (Range (seq.begin(), seq.end()));
} }
@ -391,13 +391,13 @@ namespace iter_stl {
inline typename _MapT<MMAP>::ValIter inline typename _MapT<MMAP>::ValIter
eachValForKey (MMAP& multimap, KEY key) eachValForKey (MMAP& multimap, KEY key)
{ {
typedef typename _MapT<MMAP>::EntryIter Pos; using Pos = typename _MapT<MMAP>::EntryIter;
typedef typename _MapT<MMAP>::ValIter Range; using Range = typename _MapT<MMAP>::ValIter;
typedef typename _MapT<MMAP>::PickValIter PickVal; using PickVal = typename _MapT<MMAP>::PickValIter;
std::pair<Pos,Pos> valRange = multimap.equal_range (key); std::pair<Pos,Pos> valRange = multimap.equal_range (key);
return Range (PickVal (valRange.first), PickVal (valRange.second)); return Range (PickVal{valRange.first}, PickVal{valRange.second});
} }
@ -413,7 +413,7 @@ namespace iter_stl {
template<typename VAL> template<typename VAL>
class IterSnapshot class IterSnapshot
{ {
typedef std::vector<VAL> Sequence; using Sequence = std::vector<VAL>;
mutable mutable
Sequence buffer_; Sequence buffer_;
@ -483,9 +483,9 @@ namespace iter_stl {
/* === lumiera forward iterator concept === */ /* === lumiera forward iterator concept === */
typedef VAL* pointer; using pointer = VAL*;
typedef VAL& reference; using reference = VAL&;
typedef VAL value_type; using value_type = VAL ;
reference reference
operator*() const operator*() const

View file

@ -283,7 +283,7 @@ namespace lib {
bool bool
check() const check() const
{ {
return source_ && checkPoint (source_,pos_); // extension point: free function checkPoint(...) return source_ and checkPoint (source_,pos_); // extension point: free function checkPoint(...)
} }
/** ask the controlling container to yield the next position. /** ask the controlling container to yield the next position.
@ -864,7 +864,7 @@ namespace lib {
bool bool
isValid () const isValid () const
{ {
return (p_!= IT()) && (p_ != e_); return (p_!= IT()) and (p_ != e_);
} }
bool bool
@ -896,10 +896,10 @@ namespace lib {
/// Supporting equality comparisons... /// Supporting equality comparisons...
template<class I1, class I2> template<class I1, class I2>
inline bool operator== (RangeIter<I1> const& il, RangeIter<I2> const& ir) { return (!il && !ir) || (il.getPos() == ir.getPos()); } inline bool operator== (RangeIter<I1> const& il, RangeIter<I2> const& ir) { return (!il and !ir) or (il.getPos() == ir.getPos()); }
template<class I1, class I2> template<class I1, class I2>
inline bool operator!= (RangeIter<I1> const& il, RangeIter<I2> const& ir) { return !(il == ir); } inline bool operator!= (RangeIter<I1> const& il, RangeIter<I2> const& ir) { return not (il == ir); }
@ -923,9 +923,9 @@ namespace lib {
INT e_; INT e_;
public: public:
typedef INT* pointer; using pointer = INT*;
typedef INT& reference; using reference = INT&;
typedef INT value_type; using value_type = INT ;
NumIter (INT start, INT end) NumIter (INT start, INT end)
: i_(start) : i_(start)
@ -1035,13 +1035,13 @@ namespace lib {
template<template<class,class> class Iter, class TY, class CON> template<template<class,class> class Iter, class TY, class CON>
struct IterType<Iter<TY,CON>> struct IterType<Iter<TY,CON>>
{ {
typedef CON Container; using Container = CON;
typedef TY ElemType; using ElemType = TY ;
template<class T2> template<class T2>
struct SimilarIter ///< rebind to a similarly structured Iterator with value type T2 struct SimilarIter ///< rebind to a similarly structured Iterator with value type T2
{ {
typedef Iter<T2,CON> Type; using Type = Iter<T2,CON>;
}; };
}; };
@ -1052,8 +1052,8 @@ namespace lib {
template<class T2> template<class T2>
struct SimilarIter ///< rebind to rewritten Iterator wrapped into RangeIter struct SimilarIter ///< rebind to rewritten Iterator wrapped into RangeIter
{ {
typedef typename IterType<IT>::template SimilarIter<T2>::Type WrappedIter; using WrappedIter = typename IterType<IT>::template SimilarIter<T2>::Type;
typedef RangeIter<WrappedIter> Type; using Type = RangeIter<WrappedIter>;
}; };
}; };
@ -1067,9 +1067,9 @@ namespace lib {
public: public:
typedef const typename IT::value_type value_type; using value_type = const typename IT::value_type;
typedef const typename IT::pointer pointer; using pointer = const typename IT::pointer ;
typedef const typename IT::reference reference; using reference = const typename IT::reference ;
ConstIter (IT srcIter) ConstIter (IT srcIter)
: i_(srcIter) : i_(srcIter)

View file

@ -81,8 +81,8 @@ namespace lib {
protected: /* == data source API to implement == */ protected: /* == data source API to implement == */
typedef TY* Pos; using Pos = TY*;
typedef shared_ptr<IterSource> DataHandle; using DataHandle = shared_ptr<IterSource>;
///////////////////////////////////////////////TICKET #1125 : this API should use three control functions, similar to IterStateWrapper ///////////////////////////////////////////////TICKET #1125 : this API should use three control functions, similar to IterStateWrapper
/** iteration start: prepare the first element. /** iteration start: prepare the first element.
@ -326,8 +326,8 @@ namespace lib {
// we can strip the const added by the STL map types // we can strip the const added by the STL map types
using KeyType = typename std::remove_const<ConstKeyType>::type; using KeyType = typename std::remove_const<ConstKeyType>::type;
typedef TransformIter<Src, KeyType> KeyIter; using KeyIter = TransformIter<Src, KeyType>;
typedef TransformIter<Src, ValType> ValIter; using ValIter = TransformIter<Src, ValType>;
static KeyType takeFirst (PairType const& pair) { return pair.first; } static KeyType takeFirst (PairType const& pair) { return pair.first; }
static ValType takeSecond(PairType const& pair) { return pair.second;} static ValType takeSecond(PairType const& pair) { return pair.second;}
@ -395,8 +395,8 @@ namespace lib {
typename _TransformIterT<IT,FUN>::Iter typename _TransformIterT<IT,FUN>::Iter
transform (IT&& source, FUN processingFunc) transform (IT&& source, FUN processingFunc)
{ {
typedef typename _TransformIterT<IT,FUN>::ResVal ValType; using ValType = typename _TransformIterT<IT,FUN>::ResVal;
typedef typename _TransformIterT<IT,FUN>::TransIter TransIT; using TransIT = typename _TransformIterT<IT,FUN>::TransIter;
return IterSource<ValType>::build ( return IterSource<ValType>::build (
new WrappedLumieraIter<TransIT> ( new WrappedLumieraIter<TransIT> (
@ -466,8 +466,8 @@ namespace lib {
/** @param container a STL-like container, providing /** @param container a STL-like container, providing
* - a typedef \c iterator * - a typedef `iterator`
* - functions \c begin() and \c end() * - functions `begin()` and `end()`
* @return a Lumiera Forward Iterator yielding all values * @return a Lumiera Forward Iterator yielding all values
* starting with \c begin and excluding \c end . * starting with \c begin and excluding \c end .
*/ */

View file

@ -137,9 +137,9 @@ namespace lib {
return bool(source_); return bool(source_);
} }
typedef typename IT::pointer pointer; using pointer = typename IT::pointer;
typedef typename IT::reference reference; using reference = typename IT::reference;
typedef typename IT::value_type value_type; using value_type = typename IT::value_type;
}; };
@ -162,16 +162,16 @@ namespace lib {
hasData() const hasData() const
{ {
return core_.evaluate() return core_.evaluate()
|| unConst(this)->iterate(); or unConst(this)->iterate();
} // to skip irrelevant results doesn't count as "mutation" } // to skip irrelevant results doesn't count as "mutation"
bool bool
iterate () iterate ()
{ {
if (!core_.pipe()) return false; if (not core_.pipe()) return false;
do core_.advance(); do core_.advance();
while (core_.pipe() && !core_.evaluate()); while (core_.pipe() and not core_.evaluate());
return bool{core_.pipe()}; return bool{core_.pipe()};
} }
@ -186,9 +186,9 @@ namespace lib {
public: public:
typedef typename CORE::pointer pointer; using pointer = typename CORE::pointer;
typedef typename CORE::reference reference; using reference = typename CORE::reference;
typedef typename CORE::value_type value_type; using value_type = typename CORE::value_type;
IterTool (CORE&& setup) IterTool (CORE&& setup)
@ -248,8 +248,8 @@ namespace lib {
inline bool inline bool
operator== (IterTool<CX> const& it1, IterTool<CX> const& it2) operator== (IterTool<CX> const& it1, IterTool<CX> const& it2)
{ {
return (!it1 && !it2 ) return (!it1 and !it2 )
|| ( it1 && it2 && (*it1) == (*it2) ) or ( it1 and it2 and (*it1) == (*it2) )
; ;
} }
@ -289,7 +289,7 @@ namespace lib {
evaluate () const evaluate () const
{ {
return Raw::pipe() return Raw::pipe()
&& currVal_isOK(); and currVal_isOK();
} }
@ -299,9 +299,9 @@ namespace lib {
bool bool
currVal_isOK () const ///< @return (maybe cached) result of filter predicate currVal_isOK () const ///< @return (maybe cached) result of filter predicate
{ {
return (cached_ && isOK_) return (cached_ and isOK_)
|| (cached_ = true or (cached_ = true
&&(isOK_ = predicate_(*Raw::pipe()))); and (isOK_ = predicate_(*Raw::pipe())));
} }
void void
@ -337,7 +337,7 @@ namespace lib {
class FilterIter class FilterIter
: public IterTool<FilterCore<IT>> : public IterTool<FilterCore<IT>>
{ {
typedef FilterCore<IT> _Filter; typedef FilterCore<IT> _Filter;
typedef IterTool<_Filter> _Impl; typedef IterTool<_Filter> _Impl;
public: public:
@ -542,7 +542,7 @@ namespace lib {
template<typename VAL> template<typename VAL>
class SkipRepetition class SkipRepetition
{ {
typedef wrapper::ItemWrapper<VAL> Item; using Item = wrapper::ItemWrapper<VAL>;
Item prev_; Item prev_;
@ -550,7 +550,7 @@ namespace lib {
bool bool
operator() (VAL const& elm) operator() (VAL const& elm)
{ {
if (prev_ && if (prev_ and
(*prev_ == elm)) (*prev_ == elm))
return false; return false;
@ -559,7 +559,7 @@ namespace lib {
return true; return true;
} }
typedef bool result_type; using result_type = bool;
}; };
@ -578,7 +578,7 @@ namespace lib {
template<typename VAL> template<typename VAL>
class SingleValCore class SingleValCore
{ {
typedef wrapper::ItemWrapper<VAL> Item; using Item = wrapper::ItemWrapper<VAL>;
Item theValue_; Item theValue_;
@ -607,9 +607,9 @@ namespace lib {
return theValue_.isValid(); return theValue_.isValid();
} }
typedef std::remove_reference_t<VAL> * pointer; using pointer = std::remove_reference_t<VAL> *;
typedef std::remove_reference_t<VAL> & reference; using reference = std::remove_reference_t<VAL> &;
typedef std::remove_reference_t<VAL> value_type; using value_type = std::remove_reference_t<VAL> ;
}; };

View file

@ -48,7 +48,7 @@ namespace lumiera {
// ==== implementation LifecycleHook class ======= // ==== implementation LifecycleHook class =======
typedef LifecycleRegistry::Hook Callback; using Callback = LifecycleRegistry::Hook;
LifecycleHook::LifecycleHook (Symbol eventLabel, Callback callbackFun) LifecycleHook::LifecycleHook (Symbol eventLabel, Callback callbackFun)

View file

@ -315,7 +315,7 @@
\ \
public: \ public: \
static const bool value = (sizeof(Yes_t)==sizeof(check1<TY>(0)) \ static const bool value = (sizeof(Yes_t)==sizeof(check1<TY>(0)) \
||sizeof(Yes_t)==sizeof(check2<TY>(0))); \ or sizeof(Yes_t)==sizeof(check2<TY>(0))); \
}; };

View file

@ -129,7 +129,7 @@ namespace lib {
template<class BA> template<class BA>
struct InPlaceAnyHolder_useCommonBase struct InPlaceAnyHolder_useCommonBase
{ {
typedef BA Base; using Base = BA;
template<class SUB> template<class SUB>
static Base* static Base*
@ -159,7 +159,7 @@ namespace lib {
*/ */
struct InPlaceAnyHolder_unrelatedTypes struct InPlaceAnyHolder_unrelatedTypes
{ {
typedef void Base; using Base = void;
template<class SUB> template<class SUB>
static void* static void*
@ -184,7 +184,7 @@ namespace lib {
* or cleared afterwards, and this #empty() state may be detected * or cleared afterwards, and this #empty() state may be detected
* at runtime. In a similar vein, when the stored object has a * at runtime. In a similar vein, when the stored object has a
* `bool` validity check, this can be accessed though #isValid(). * `bool` validity check, this can be accessed though #isValid().
* Moreover `!empty() && isValid()` may be tested as by `bool` * Moreover `not empty() and isValid()` may be tested as by `bool`
* conversion of the Holder object. The whole compound * conversion of the Holder object. The whole compound
* is copyable if and only if the contained object is copyable. * is copyable if and only if the contained object is copyable.
* *
@ -200,7 +200,7 @@ namespace lib {
> >
class InPlaceAnyHolder class InPlaceAnyHolder
{ {
typedef typename AccessPolicy::Base * BaseP; using BaseP = typename AccessPolicy::Base *;
/** Inner capsule managing the contained object (interface) */ /** Inner capsule managing the contained object (interface) */
struct Buffer struct Buffer
@ -451,8 +451,8 @@ namespace lib {
template<class SUB> template<class SUB>
SUB& get() const SUB& get() const
{ {
typedef const Buffer* Iface; using Iface = const Buffer *;
typedef const Buff<SUB> * Actual; using Actual = const Buff<SUB> *;
Iface interface = &buff(); Iface interface = &buff();
Actual actual = dynamic_cast<Actual> (interface); Actual actual = dynamic_cast<Actual> (interface);
if (actual) if (actual)

View file

@ -111,7 +111,7 @@ namespace lib {
points_to (T const& target) const points_to (T const& target) const
{ {
return isValid() return isValid()
&& ref_ == &target; and ref_ == &target;
} }
friend bool friend bool

View file

@ -97,27 +97,27 @@ namespace lib {
//////////////////TICKET #932 Clang is unable to fill in the default template argument. Resolved in newer versions of Clang. Temporary workaround: add second parameter B //////////////////TICKET #932 Clang is unable to fill in the default template argument. Resolved in newer versions of Clang. Temporary workaround: add second parameter B
template<typename _O_,typename B> template<typename _O_,typename B>
friend inline bool friend inline bool
operator== (P const& p, P<_O_, B> const& q) { return (p && q)? (*p == *q) : (!p && !q); } operator== (P const& p, P<_O_, B> const& q) { return (p and q)? (*p == *q) : (!p and !q); }
template<typename _O_,typename B> template<typename _O_,typename B>
friend inline bool friend inline bool
operator!= (P const& p, P<_O_, B> const& q) { return (p && q)? (*p != *q) : !(!p && !q); } operator!= (P const& p, P<_O_, B> const& q) { return (p and q)? (*p != *q) : !(!p and !q); }
template<typename _O_,typename B> template<typename _O_,typename B>
friend inline bool friend inline bool
operator< (P const& p, P<_O_, B> const& q) { REQUIRE (p && q); return *p < *q; } ///< @note deliberately not allowing comparison on NIL ////TICKET #307 : problem with equality test in associative containers, where equal(a,b) := !(a < b) && !(b < a) operator< (P const& p, P<_O_, B> const& q) { REQUIRE (p and q); return *p < *q; } ///< @note deliberately not allowing comparison on NIL ////TICKET #307 : problem with equality test in associative containers, where equal(a,b) := !(a < b) and !(b < a)
template<typename _O_,typename B> template<typename _O_,typename B>
friend inline bool friend inline bool
operator> (P const& p, P<_O_, B> const& q) { REQUIRE (p && q); return *q < *p; } operator> (P const& p, P<_O_, B> const& q) { REQUIRE (p and q); return *q < *p; }
template<typename _O_,typename B> template<typename _O_,typename B>
friend inline bool friend inline bool
operator<= (P const& p, P<_O_, B> const& q) { REQUIRE (p && q); return *p <= *q;} operator<= (P const& p, P<_O_, B> const& q) { REQUIRE (p and q); return *p <= *q;}
template<typename _O_,typename B> template<typename _O_,typename B>
friend inline bool friend inline bool
operator>= (P const& p, P<_O_, B> const& q) { REQUIRE (p && q); return *p >= *q;} operator>= (P const& p, P<_O_, B> const& q) { REQUIRE (p and q); return *p >= *q;}
}; };

View file

@ -400,7 +400,7 @@ namespace lib {
firstNonempty () const firstNonempty () const
{ {
iterator startPos{this, elms_.begin()}; iterator startPos{this, elms_.begin()};
while (startPos && isnil (*startPos)) while (startPos and isnil (*startPos))
++startPos; ++startPos;
return startPos; return startPos;
} }

View file

@ -242,7 +242,7 @@ namespace lib {
public: public:
enum{ value = exposes_CloneFunction<T>::value enum{ value = exposes_CloneFunction<T>::value
&& ! HasMember_copyInto<T>::value and not HasMember_copyInto<T>::value
}; };
}; };
@ -471,7 +471,7 @@ namespace lib {
public: /* === PolymorphicValue public API === */ public: /* === PolymorphicValue public API === */
typedef IFA Interface; using Interface = IFA;
Interface& Interface&
getPayload() getPayload()

View file

@ -52,7 +52,7 @@ namespace lib {
normaliseID (string& id) normaliseID (string& id)
{ {
id = util::sanitise(id); id = util::sanitise(id);
if (isnil(id) || !is_alpha (id[0])) if (isnil(id) or not is_alpha (id[0]))
id.insert(0, "o"); id.insert(0, "o");

View file

@ -94,7 +94,7 @@ namespace lib {
bool bool
empty() const empty() const
{ {
return !str_ || 0 == std::strlen(str_); return not str_ or 0 == std::strlen(str_);
} }
bool operator== (CStr cString) const; bool operator== (CStr cString) const;

View file

@ -46,7 +46,7 @@ namespace test {
class Test; class Test;
class Launcher; class Launcher;
typedef std::vector<string> & Arg; using Arg = std::vector<string>&;
/** /**

View file

@ -162,7 +162,6 @@ namespace mutation {
// using default construction and copy // using default construction and copy
}; };
}}} // lib::time::mutation }}} // lib::time::mutation

View file

@ -644,7 +644,7 @@ namespace time {
contains (TimeValue const& tp) const contains (TimeValue const& tp) const
{ {
return *this <= tp return *this <= tp
&& tp < end(); and tp < end();
} }
/** may change start / duration */ /** may change start / duration */

View file

@ -119,7 +119,7 @@ namespace util {
floorwrap (I num, I den) floorwrap (I num, I den)
{ {
IDiv<I> res(num,den); IDiv<I> res(num,den);
if (0 > (num^den) && res.rem) if (0 > (num^den) and res.rem)
{ // negative results { // negative results
// wrapped similar to floor() // wrapped similar to floor()
--res.quot; --res.quot;
@ -151,7 +151,7 @@ namespace util {
{ {
using std::fabs; using std::fabs;
return fabs (d1-d2) < DBL_EPSILON * fabs (d1+d2) * ulp return fabs (d1-d2) < DBL_EPSILON * fabs (d1+d2) * ulp
|| fabs (d1-d2) < DBL_MIN; // special treatment for subnormal results or fabs (d1-d2) < DBL_MIN; // special treatment for subnormal results
} }

View file

@ -62,13 +62,13 @@ namespace util {
string::const_iterator e = i + (res.length()); string::const_iterator e = i + (res.length());
while ( i != e ) while ( i != e )
{ {
while ( i != e && !isValid (*i) ) ++i; while ( i != e and !isValid (*i) ) ++i;
while ( i != e && isValid (*i) ) *(j++) = *(i++); while ( i != e and isValid (*i) ) *(j++) = *(i++);
if ( i != e && isPunct (*i) ) if ( i != e and isPunct (*i) )
{ {
*j++ = '_'; *j++ = '_';
do ++i; do ++i;
while ( i != e && isPunct (*i)); while ( i != e and isPunct (*i));
} }
} }
res.erase(j,res.end()); res.erase(j,res.end());

View file

@ -108,7 +108,7 @@ namespace visitor {
template<class TAR, class TOOL> template<class TAR, class TOOL>
class Dispatcher class Dispatcher
{ {
typedef typename TOOL::ReturnType ReturnType; using ReturnType = typename TOOL::ReturnType;
/** generator for Trampoline functions, /** generator for Trampoline functions,
* used to dispatch calls down to the * used to dispatch calls down to the
@ -147,7 +147,7 @@ namespace visitor {
inline bool inline bool
is_known (size_t id) is_known (size_t id)
{ {
return id<=table_.size() && table_[id-1]; return id<=table_.size() and table_[id-1];
} }
inline void inline void
@ -163,7 +163,7 @@ namespace visitor {
inline Trampoline inline Trampoline
storedTrampoline (size_t id) storedTrampoline (size_t id)
{ {
if (id<=table_.size() && table_[id-1]) if (id<=table_.size() and table_[id-1])
return table_[id-1]; return table_[id-1];
else else
return &errorHandler; return &errorHandler;
@ -199,7 +199,6 @@ namespace visitor {
Trampoline func = &callTrampoline<TOOLImpl>; Trampoline func = &callTrampoline<TOOLImpl>;
storePtr (index, func); storePtr (index, func);
} }
} }
}; };

View file

@ -98,8 +98,8 @@ namespace visitor {
class Tool : public ERR<RET> class Tool : public ERR<RET>
{ {
public: public:
typedef RET ReturnType; ///< Tool function invocation return type using ReturnType = RET; ///< Tool function invocation return type
typedef Tool ToolBase; ///< for templating the Tag and Dispatcher using ToolBase = Tool; ///< for templating the Tag and Dispatcher
virtual ~Tool () { }; ///< use RTTI for all visiting tools virtual ~Tool () { }; ///< use RTTI for all visiting tools
@ -152,7 +152,7 @@ namespace visitor {
: public Applicable<TOOLImpl, TYPES, BASE> : public Applicable<TOOLImpl, TYPES, BASE>
{ {
typedef typename BASE::ToolBase ToolBase; using ToolBase = typename BASE::ToolBase;
protected: protected:
virtual ~Applicable () {} virtual ~Applicable () {}
@ -188,7 +188,7 @@ namespace visitor {
class Visitable class Visitable
{ {
public: public:
typedef typename TOOL::ReturnType ReturnType; using ReturnType = typename TOOL::ReturnType;
/** to be defined by the DEFINE_PROCESSABLE_BY macro /** to be defined by the DEFINE_PROCESSABLE_BY macro
* in all classes wanting to be treated by some tool */ * in all classes wanting to be treated by some tool */
@ -199,7 +199,7 @@ namespace visitor {
virtual ~Visitable () { }; virtual ~Visitable () { };
/// @note may differ from TOOL /// @note may differ from TOOL
typedef typename TOOL::ToolBase ToolBase; using ToolBase = typename TOOL::ToolBase;
/** @internal used by the #DEFINE_PROCESSABLE_BY macro. /** @internal used by the #DEFINE_PROCESSABLE_BY macro.
* Dispatches to the actual operation on the * Dispatches to the actual operation on the

View file

@ -58,7 +58,7 @@ namespace lumiera {
* @deprecated not sure if this was a good idea anyway. Better re-think how to handle wrapped objects in visitation * @deprecated not sure if this was a good idea anyway. Better re-think how to handle wrapped objects in visitation
* @todo really need to switch to the new lib::Variant and util::AccessCasted implementation ////////////////TICKET #450 * @todo really need to switch to the new lib::Variant and util::AccessCasted implementation ////////////////TICKET #450
*/ */
typedef lib::VariantO<steam::WrapperTypes, util::AccessCasted_O> WrapperPtr; using WrapperPtr = lib::VariantO<steam::WrapperTypes, util::AccessCasted_O>;

View file

@ -68,7 +68,7 @@ namespace ctrl{
: public BusTerm : public BusTerm
, util::NonCopyable , util::NonCopyable
{ {
typedef std::unordered_map<EntryID, Tangible*, EntryID::UseEmbeddedHash> RoutingTable; using RoutingTable = std::unordered_map<EntryID, Tangible*, EntryID::UseEmbeddedHash>;
RoutingTable routingTable_; RoutingTable routingTable_;

View file

@ -210,10 +210,10 @@ namespace interact {
using lib::meta::Types; using lib::meta::Types;
using lib::meta::func::PApply; using lib::meta::func::PApply;
typedef typename _Fun<FUN>::Ret Ret; using Ret = typename _Fun<FUN>::Ret;
typedef typename _Fun<FUN>::Args Args; using Args = typename _Fun<FUN>::Args;
typedef typename Split<Args>::Head Arg1; using Arg1 = typename Split<Args>::Head;
typedef typename Split<Args>::Tail FurtherArgs; using FurtherArgs = typename Split<Args>::Tail;
static_assert (std::is_convertible<UICoord, Arg1>::value, static_assert (std::is_convertible<UICoord, Arg1>::value,
"Allocator function must accept UICoordinates (where to create/locate) as first argument"); "Allocator function must accept UICoordinates (where to create/locate) as first argument");

View file

@ -59,7 +59,7 @@ namespace output {
if (XvQueryAdaptors (display, window, &count, &adaptorInfo) == Success) if (XvQueryAdaptors (display, window, &count, &adaptorInfo) == Success)
{ {
INFO(stage, "XvQueryAdaptors count: %d", count); INFO(stage, "XvQueryAdaptors count: %d", count);
for (uint n = 0; gotPort == false && n < count; ++n ) for (uint n = 0; gotPort == false and n < count; ++n )
{ {
// Diagnostics // Diagnostics
INFO(stage, "%s, %lu, %lu", adaptorInfo[ n ].name, INFO(stage, "%s, %lu, %lu", adaptorInfo[ n ].name,
@ -87,7 +87,7 @@ namespace output {
( list[ i ].id >> 16 ) & 0xff, ( list[ i ].id >> 16 ) & 0xff,
( list[ i ].id >> 24 ) & 0xff, ( list[ i ].id >> 24 ) & 0xff,
( list[ i ].format == XvPacked ) ? "packed" : "planar" ); ( list[ i ].format == XvPacked ) ? "packed" : "planar" );
if ( list[ i ].id == FORMAT_ID_YUY2 && !gotPort ) if ( list[ i ].id == FORMAT_ID_YUY2 and not gotPort )
gotPort = true; gotPort = true;
} }

View file

@ -486,21 +486,21 @@ namespace widget {
int mins = getMins (when); int mins = getMins (when);
float secs = getSecs (when); float secs = getSecs (when);
if (force || hrs != ms_last_hrs) if (force or hrs != ms_last_hrs)
{ {
sprintf(buf, "%02d", hrs); ///////////////////////////////////////////////////////////////////TICKET #750 : code smell, integrate Timecode formats sprintf(buf, "%02d", hrs); ///////////////////////////////////////////////////////////////////TICKET #750 : code smell, integrate Timecode formats
ms_hours_label.set_text(buf); ms_hours_label.set_text(buf);
ms_last_hrs = hrs; ms_last_hrs = hrs;
} }
if (force || mins != ms_last_mins) if (force or mins != ms_last_mins)
{ {
sprintf(buf, "%02d", mins); sprintf(buf, "%02d", mins);
ms_minutes_label.set_text(buf); ms_minutes_label.set_text(buf);
ms_last_mins = mins; ms_last_mins = mins;
} }
if (force || secs != ms_last_secs) if (force or secs != ms_last_secs)
{ {
sprintf(buf, "%06.3f", secs); sprintf(buf, "%06.3f", secs);
ms_seconds_label.set_text(buf); ms_seconds_label.set_text(buf);
@ -526,7 +526,7 @@ namespace widget {
// session->smpte_time(when, smpte); // session->smpte_time(when, smpte);
// } // }
if (force || smpte_hours != last_hrs || smpte_negative != last_negative) if (force or smpte_hours != last_hrs or smpte_negative != last_negative)
{ {
if (smpte_negative) if (smpte_negative)
{ {
@ -541,21 +541,21 @@ namespace widget {
last_negative = smpte_negative; last_negative = smpte_negative;
} }
if (force || smpte_minutes != last_mins) if (force or smpte_minutes != last_mins)
{ {
sprintf(buf, "%02d", smpte_minutes); sprintf(buf, "%02d", smpte_minutes);
minutes_label.set_text(buf); minutes_label.set_text(buf);
last_mins = smpte_minutes; last_mins = smpte_minutes;
} }
if (force || smpte_seconds != last_secs) if (force or smpte_seconds != last_secs)
{ {
sprintf(buf, "%02d", smpte_seconds); sprintf(buf, "%02d", smpte_seconds);
seconds_label.set_text(buf); seconds_label.set_text(buf);
last_secs = smpte_seconds; last_secs = smpte_seconds;
} }
if (force || smpte_frames != last_frames) if (force or smpte_frames != last_frames)
{ {
sprintf(buf, "%02d", smpte_frames); sprintf(buf, "%02d", smpte_frames);
frames_label.set_text(buf); frames_label.set_text(buf);
@ -911,8 +911,8 @@ namespace widget {
{ {
gdk_pointer_ungrab(GDK_CURRENT_TIME); gdk_pointer_ungrab(GDK_CURRENT_TIME);
dragging = false; dragging = false;
if (ev->y > drag_start_y+1 || ev->y < drag_start_y-1 if (ev->y > drag_start_y+1 or ev->y < drag_start_y-1
|| (ev->state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK) or (ev->state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK)
{ {
// we actually dragged so return without setting editing focus, or we shift clicked // we actually dragged so return without setting editing focus, or we shift clicked
return true; return true;

View file

@ -96,7 +96,7 @@ namespace workspace {
///////////////////////////////////////////////////////TICKET #1027 : investigate what would be the proper way to do this with gdlmm (C++ binding). No direct usage of GDL ! ///////////////////////////////////////////////////////TICKET #1027 : investigate what would be the proper way to do this with gdlmm (C++ binding). No direct usage of GDL !
REQUIRE(dockPlaceholders_[0] == NULL && dockPlaceholders_[1] == NULL && REQUIRE(dockPlaceholders_[0] == NULL && dockPlaceholders_[1] == NULL &&
dockPlaceholders_[2] == NULL && dockPlaceholders_[3] == NULL); dockPlaceholders_[2] == NULL && dockPlaceholders_[3] == NULL);
dockPlaceholders_[0] = GDL_DOCK_PLACEHOLDER(gdl_dock_placeholder_new( dockPlaceholders_[0] = GDL_DOCK_PLACEHOLDER(gdl_dock_placeholder_new(
"ph1", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_TOP, FALSE)); "ph1", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_TOP, FALSE));
dockPlaceholders_[1] = GDL_DOCK_PLACEHOLDER(gdl_dock_placeholder_new( dockPlaceholders_[1] = GDL_DOCK_PLACEHOLDER(gdl_dock_placeholder_new(
@ -105,8 +105,8 @@ namespace workspace {
"ph3", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_LEFT, FALSE)); "ph3", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_LEFT, FALSE));
dockPlaceholders_[3] = GDL_DOCK_PLACEHOLDER(gdl_dock_placeholder_new( dockPlaceholders_[3] = GDL_DOCK_PLACEHOLDER(gdl_dock_placeholder_new(
"ph4", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_RIGHT, FALSE)); "ph4", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_RIGHT, FALSE));
ENSURE(dockPlaceholders_[0] && dockPlaceholders_[1] && ENSURE(dockPlaceholders_[0] and dockPlaceholders_[1] and
dockPlaceholders_[2] && dockPlaceholders_[3]); dockPlaceholders_[2] and dockPlaceholders_[3]);
createPanels(); createPanels();
} }
@ -176,8 +176,8 @@ namespace workspace {
void void
DockArea::switchPanel (panel::Panel& old_panel, const int description_index) DockArea::switchPanel (panel::Panel& old_panel, const int description_index)
{ {
REQUIRE (description_index >= 0 && REQUIRE (description_index >= 0);
description_index < getPanelDescriptionCount()); REQUIRE (description_index < getPanelDescriptionCount());
// Get the dock item // Get the dock item
Gdl::DockItem &dock_item = old_panel.getDockItem(); Gdl::DockItem &dock_item = old_panel.getDockItem();
@ -231,7 +231,8 @@ namespace workspace {
const gchar* const gchar*
DockArea::getPanelStockID (int index) DockArea::getPanelStockID (int index)
{ {
REQUIRE (index >= 0 && index < getPanelDescriptionCount()); REQUIRE (index >= 0);
REQUIRE (index < getPanelDescriptionCount());
return panelDescriptionList[index].getStockID(); return panelDescriptionList[index].getStockID();
} }
@ -239,7 +240,8 @@ namespace workspace {
const char* const char*
DockArea::getPanelTitle (int index) DockArea::getPanelTitle (int index)
{ {
REQUIRE (index >= 0 && index < getPanelDescriptionCount()); REQUIRE (index >= 0);
REQUIRE (index < getPanelDescriptionCount());
return panelDescriptionList[index].getTitle(); return panelDescriptionList[index].getTitle();
} }
@ -278,7 +280,8 @@ namespace workspace {
panel::Panel* panel::Panel*
DockArea::createPanel_by_index (const int index) DockArea::createPanel_by_index (const int index)
{ {
REQUIRE(index >= 0 && index < getPanelDescriptionCount()); REQUIRE (index >= 0);
REQUIRE (index < getPanelDescriptionCount());
// Make a unique name for the panel // Make a unique name for the panel
char name[5]; char name[5];
@ -370,7 +373,7 @@ namespace workspace {
DockArea::on_panel_shown (panel::Panel* panel) DockArea::on_panel_shown (panel::Panel* panel)
{ {
REQUIRE(panel); REQUIRE(panel);
if(panel->is_shown() || panel->is_iconified()) return; if (panel->is_shown() or panel->is_iconified()) return;
removePanel(panel); removePanel(panel);
} }

View file

@ -91,7 +91,7 @@ namespace workspace {
///////////////////////////////////////////////////////TICKET #1027 : investigate what would be the proper way to do this with gdlmm (C++ binding). No direct usage of GDL ! ///////////////////////////////////////////////////////TICKET #1027 : investigate what would be the proper way to do this with gdlmm (C++ binding). No direct usage of GDL !
REQUIRE(dockPlaceholders_[0] == NULL && dockPlaceholders_[1] == NULL && REQUIRE(dockPlaceholders_[0] == NULL && dockPlaceholders_[1] == NULL &&
dockPlaceholders_[2] == NULL && dockPlaceholders_[3] == NULL); dockPlaceholders_[2] == NULL && dockPlaceholders_[3] == NULL);
dockPlaceholders_[0] = GDL_DOCK_PLACEHOLDER(gdl_dock_placeholder_new( dockPlaceholders_[0] = GDL_DOCK_PLACEHOLDER(gdl_dock_placeholder_new(
"ph1", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_TOP, FALSE)); "ph1", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_TOP, FALSE));
dockPlaceholders_[1] = GDL_DOCK_PLACEHOLDER(gdl_dock_placeholder_new( dockPlaceholders_[1] = GDL_DOCK_PLACEHOLDER(gdl_dock_placeholder_new(
@ -100,8 +100,8 @@ namespace workspace {
"ph3", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_LEFT, FALSE)); "ph3", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_LEFT, FALSE));
dockPlaceholders_[3] = GDL_DOCK_PLACEHOLDER(gdl_dock_placeholder_new( dockPlaceholders_[3] = GDL_DOCK_PLACEHOLDER(gdl_dock_placeholder_new(
"ph4", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_RIGHT, FALSE)); "ph4", GDL_DOCK_OBJECT(dock_.gobj()), GDL_DOCK_RIGHT, FALSE));
ENSURE(dockPlaceholders_[0] && dockPlaceholders_[1] && ENSURE(dockPlaceholders_[0] and dockPlaceholders_[1] and
dockPlaceholders_[2] && dockPlaceholders_[3]); dockPlaceholders_[2] and dockPlaceholders_[3]);
createPanels(); createPanels();
} }
@ -170,8 +170,8 @@ namespace workspace {
void void
PanelManager::switchPanel (panel::Panel& old_panel, const int description_index) PanelManager::switchPanel (panel::Panel& old_panel, const int description_index)
{ {
REQUIRE (description_index >= 0 && REQUIRE (description_index >= 0);
description_index < getPanelDescriptionCount()); REQUIRE (description_index < getPanelDescriptionCount());
// Get the dock item // Get the dock item
Gdl::DockItem &dock_item = old_panel.getDockItem(); Gdl::DockItem &dock_item = old_panel.getDockItem();
@ -225,7 +225,8 @@ namespace workspace {
const gchar* const gchar*
PanelManager::getPanelStockID (int index) PanelManager::getPanelStockID (int index)
{ {
REQUIRE (index >= 0 && index < getPanelDescriptionCount()); REQUIRE (index >= 0);
REQUIRE (index < getPanelDescriptionCount());
return panelDescriptionList[index].getStockID(); return panelDescriptionList[index].getStockID();
} }
@ -233,7 +234,8 @@ namespace workspace {
const char* const char*
PanelManager::getPanelTitle (int index) PanelManager::getPanelTitle (int index)
{ {
REQUIRE (index >= 0 && index < getPanelDescriptionCount()); REQUIRE (index >= 0);
REQUIRE (index < getPanelDescriptionCount());
return panelDescriptionList[index].getTitle(); return panelDescriptionList[index].getTitle();
} }

View file

@ -175,10 +175,10 @@ namespace asset {
const uint version; const uint version;
Ident (const string& n, Ident (string const& n
const Category& cat, ,Category const& cat
const string& o = "lumi", ,string const& o = "lumi"
const uint ver=1); ,const uint ver=1);
int compare (Ident const& other) const; int compare (Ident const& other) const;

View file

@ -63,7 +63,6 @@ namespace asset {
{ {
nodes.push_back(node); nodes.push_back(node);
} }
}; };

View file

@ -34,7 +34,7 @@ namespace asset {
*/ */
Category::operator string () const Category::operator string () const
{ {
typedef const char * const SymID; using SymID = const char * const;
SymID kinds[6] = { "AUDIO" SymID kinds[6] = { "AUDIO"
, "VIDEO" , "VIDEO"
@ -59,8 +59,8 @@ namespace asset {
bool bool
Category::isWithin (const Category& ref) const Category::isWithin (const Category& ref) const
{ {
return ( ref.hasKind (kind_) return ( ref.hasKind (kind_)
&& starts_with (path_, ref.path_) and starts_with (path_, ref.path_)
); );
} }

View file

@ -73,8 +73,8 @@ namespace asset {
Category (const Kind root, Literal subfolder ="") Category (const Kind root, Literal subfolder ="")
: kind_(root), path_(subfolder) {}; : kind_(root), path_(subfolder) {};
bool operator== (Category const& other) const { return kind_== other.kind_ && path_== other.path_; } bool operator== (Category const& other) const { return kind_== other.kind_ and path_== other.path_; }
bool operator!= (Category const& other) const { return kind_!= other.kind_ || path_!= other.path_; } bool operator!= (Category const& other) const { return kind_!= other.kind_ or path_!= other.path_; }
bool hasKind (Kind refKind) const { return kind_ == refKind; } bool hasKind (Kind refKind) const { return kind_ == refKind; }
bool isWithin (Category const&) const; bool isWithin (Category const&) const;

View file

@ -52,7 +52,7 @@ namespace asset {
}; };
typedef lib::P<const asset::Clip> PClipAsset; using PClipAsset = lib::P<const asset::Clip>;
const string CLIP_SUBFOLDER = "clips"; // TODO: handling of hard-wired constants.... const string CLIP_SUBFOLDER = "clips"; // TODO: handling of hard-wired constants....

View file

@ -74,7 +74,7 @@ namespace asset {
operator() (size_t val) const { return val; } operator() (size_t val) const { return val; }
}; };
typedef std::unordered_map<size_t, PAsset, IdentityHash> IdHashtable; using IdHashtable = std::unordered_map<size_t, PAsset, IdentityHash>;

View file

@ -39,7 +39,7 @@ namespace asset {
{}; {};
typedef lib::P<Inventory> PInv; using PInv = lib::P<Inventory>;
}} // namespace steam::asset }} // namespace steam::asset

View file

@ -167,9 +167,9 @@ namespace asset {
pM = new Media (key,file,length); pM = new Media (key,file,length);
} }
ASSERT (pM); ASSERT (pM);
ENSURE (key.category.hasKind (VIDEO) || key.category.hasKind(AUDIO)); ENSURE (key.category.hasKind (VIDEO) or key.category.hasKind(AUDIO));
ENSURE (!isnil (key.name)); ENSURE (not isnil (key.name));
ENSURE (dynamic_cast<Media*>(pM) || (isnil (file) && dynamic_cast<Unknown*>(pM))); ENSURE (dynamic_cast<Media*>(pM) or (isnil (file) and dynamic_cast<Unknown*>(pM)));
return aMang.getAsset (pM->getID()); // note: because we query with an ID<Media>, return aMang.getAsset (pM->getID()); // note: because we query with an ID<Media>,
// we get a Media smart ptr. // we get a Media smart ptr.

View file

@ -135,7 +135,7 @@ namespace asset {
: util::NonCopyable : util::NonCopyable
{ {
public: public:
typedef lib::P<Media> PType; using PType = lib::P<Media>;
PType operator() (Asset::Ident& key, const string& file=""); PType operator() (Asset::Ident& key, const string& file="");
PType operator() (const string& file, const Category& cat); PType operator() (const string& file, const Category& cat);

View file

@ -139,7 +139,7 @@ namespace asset {
inline ID<Meta>::ID(HashVal id) : ID<Asset> (id) {}; inline ID<Meta>::ID(HashVal id) : ID<Asset> (id) {};
inline ID<Meta>::ID(const Meta& meta) : ID<Asset> (meta.getID()) {}; inline ID<Meta>::ID(const Meta& meta) : ID<Asset> (meta.getID()) {};
typedef lib::P<Meta> PMeta; using PMeta = lib::P<Meta>;
@ -150,7 +150,7 @@ namespace asset {
: util::NonCopyable : util::NonCopyable
{ {
public: public:
typedef lib::P<asset::Meta> PType; using PType = lib::P<asset::Meta>;
template<class MA> template<class MA>
meta::Builder<MA> operator() (lib::idi::EntryID<MA> elementIdentity); meta::Builder<MA> operator() (lib::idi::EntryID<MA> elementIdentity);

View file

@ -78,7 +78,6 @@ namespace meta {
: public Meta : public Meta
, public virtual lib::time::Grid , public virtual lib::time::Grid
{ {
public: public:
/* === shortcut builder functions === */ /* === shortcut builder functions === */
static PGrid build (FrameRate frames_per_second); static PGrid build (FrameRate frames_per_second);
@ -92,7 +91,6 @@ namespace meta {
template<> template<>
struct Builder<TimeGrid> struct Builder<TimeGrid>
{ {

View file

@ -38,7 +38,6 @@ namespace asset {
return Asset::Ident (name, category, return Asset::Ident (name, category,
mediaref.org, mediaref.org,
mediaref.version ); mediaref.version );
} }
}//(End)implementation helper }//(End)implementation helper

View file

@ -82,9 +82,9 @@ namespace asset {
ProcPatt::attach(Symbol where, PProc& node) ProcPatt::attach(Symbol where, PProc& node)
{ {
DoAttach *last (0); DoAttach *last (0);
if ( !isnil (instructions_) if ( not isnil (instructions_)
&& (last = boost::get<DoAttach> (&(instructions_.back()))) and (last = boost::get<DoAttach> (&(instructions_.back())))
&& last->point==where and last->point==where
) )
// instead of adding a new build instruct entry, // instead of adding a new build instruct entry,
// we can extend the list in the last "DoAttach" entry. // we can extend the list in the last "DoAttach" entry.

View file

@ -39,10 +39,10 @@ namespace asset {
class Proc; class Proc;
class ProcPatt; class ProcPatt;
struct BuildInstruct; struct BuildInstruct;
typedef lib::P<const asset::Proc> PProc; using PProc = lib::P<const asset::Proc>;
typedef lib::P<const asset::ProcPatt> PProcPatt; using PProcPatt = lib::P<const asset::ProcPatt>;
typedef vector<BuildInstruct> InstructionSequence; using InstructionSequence = vector<BuildInstruct>;
/** /**
* "Processing Pattern" is a structural Asset * "Processing Pattern" is a structural Asset

View file

@ -65,7 +65,7 @@ namespace mobject {
namespace session { namespace session {
class Fork; class Fork;
typedef MORef<Fork> RFork; using RFork = MORef<Fork>;
}} }}
@ -73,7 +73,7 @@ namespace asset {
class Sequence; class Sequence;
typedef lib::P<Sequence> PSequence; using PSequence = lib::P<Sequence>;
@ -84,7 +84,7 @@ namespace asset {
: public Struct : public Struct
, public lib::AutoRegistered<Sequence> , public lib::AutoRegistered<Sequence>
{ {
typedef mobject::session::RFork RFork; using RFork = mobject::session::RFork;
Sequence (Ident const&); //////////////////////////////////////////////TICKET #692 pass in fork here Sequence (Ident const&); //////////////////////////////////////////////TICKET #692 pass in fork here

View file

@ -115,11 +115,11 @@ namespace asset {
% StructTraits<STRU>::namePrefix() % StructTraits<STRU>::namePrefix()
% (++i); % (++i);
} }
ENSURE (!isnil (nameID)); ENSURE (not isnil (nameID));
// does the query actually demand the Nth instance/element? // does the query actually demand the Nth instance/element?
string seqID = query.extractID (seqNrPredicate); string seqID = query.extractID (seqNrPredicate);
if (!isnil (seqID) && 1 < uNum(seqID)) if (not isnil (seqID) and 1 < uNum(seqID))
nameID += "."+seqID; nameID += "."+seqID;
Category cat (STRUCT, StructTraits<STRU>::catFolder()); Category cat (STRUCT, StructTraits<STRU>::catFolder());
@ -132,14 +132,14 @@ namespace asset {
getFork_forSequence (string const& desiredID) getFork_forSequence (string const& desiredID)
{ {
RFork fork; RFork fork;
if (!isnil (desiredID)) if (not isnil (desiredID))
fork = Session::current->elements.pick (match_specificFork (desiredID)); fork = Session::current->elements.pick (match_specificFork (desiredID));
if (fork && !Scope::containing (fork.getRef()).isRoot()) if (fork and not Scope::containing (fork.getRef()).isRoot())
{ {
UNIMPLEMENTED ("how to deal with 'stealing' a fork sub-tree to a new sequence??"); UNIMPLEMENTED ("how to deal with 'stealing' a fork sub-tree to a new sequence??");
} }
if (!fork) if (not fork)
fork = Session::current->getRoot().attach (MObject::create (ForkID (desiredID))); fork = Session::current->getRoot().attach (MObject::create (ForkID (desiredID)));
return fork; return fork;

View file

@ -71,7 +71,7 @@ namespace mobject {
namespace session { namespace session {
class Binding; class Binding;
typedef MORef<Binding> RBinding; using RBinding = MORef<Binding>;
}} }}
@ -79,7 +79,7 @@ namespace asset {
class Timeline; class Timeline;
typedef lib::P<Timeline> PTimeline; using PTimeline = lib::P<Timeline>;
/** /**
@ -92,7 +92,7 @@ namespace asset {
: public Struct : public Struct
, public lib::AutoRegistered<Timeline> , public lib::AutoRegistered<Timeline>
{ {
typedef mobject::session::RBinding RBinding; using RBinding = mobject::session::RBinding;
RBinding boundSequence_; RBinding boundSequence_;

View file

@ -58,7 +58,7 @@ namespace mobject {
namespace session { namespace session {
class Binding; class Binding;
typedef MORef<Binding> RBinding; using RBinding = MORef<Binding>;
}} }}
@ -66,7 +66,7 @@ namespace asset {
class Viewer; class Viewer;
typedef lib::P<Viewer> PViewer; using PViewer = lib::P<Viewer>;
/** /**

View file

@ -178,7 +178,7 @@ namespace asset {
AssetManager::known (IDA id, const Category& cat) AssetManager::known (IDA id, const Category& cat)
{ {
PAsset pA = registry.get (id); PAsset pA = registry.get (id);
return ( pA && pA->ident.category.isWithin(cat)); return ( pA and pA->ident.category.isWithin(cat));
} }

View file

@ -38,7 +38,7 @@ namespace control {
/** /**
* Adapter interface for invoking an argument binding for a command * Adapter interface for invoking an argument binding for a command
* \em without the need to disclose the concrete types and number of arguments. * _without the need to disclose_ the concrete types and number of arguments.
* At the receiver side, the concrete type can be restored by a dynamic cast. * At the receiver side, the concrete type can be restored by a dynamic cast.
* This requires the receiver somehow to know the desired argument types; * This requires the receiver somehow to know the desired argument types;
* usually this receiver will be an implementation object, whose exact * usually this receiver will be an implementation object, whose exact

View file

@ -81,7 +81,7 @@ namespace control {
* A neutral container internally holding * A neutral container internally holding
* the functor used to implement the Command * the functor used to implement the Command
*/ */
typedef FunErasure<StoreFunction> CmdFunctor; using CmdFunctor = FunErasure<StoreFunction>;
class CommandImplCloneBuilder; class CommandImplCloneBuilder;

View file

@ -162,7 +162,6 @@ namespace control {
REQUIRE (newContext_->isValid()); REQUIRE (newContext_->isValid());
return newContext_->getClosure(); return newContext_->getClosure();
} }
}; };

View file

@ -93,8 +93,8 @@ namespace control {
bool bool
operator() (const Command *pC1, const Command *pC2) const operator() (const Command *pC1, const Command *pC2) const
{ {
return (!pC1 && pC2) return (!pC1 and pC2)
|| ( pC1 && pC2 && (*pC1 < *pC2)); or ( pC1 and pC2 and (*pC1 < *pC2));
} }
}; };

View file

@ -340,7 +340,7 @@ namespace control {
CommandDef::isValid() const CommandDef::isValid() const
{ {
return (was_activated (prototype_)) return (was_activated (prototype_))
&& (prototype_ == registered_for (this->id_)) and (prototype_ == registered_for (this->id_))
; ;
} }
@ -350,7 +350,7 @@ namespace control {
Command::canExec() const Command::canExec() const
{ {
return isValid() return isValid()
&& impl().canExec(); and impl().canExec();
} }
@ -358,7 +358,7 @@ namespace control {
Command::canUndo() const Command::canUndo() const
{ {
return isValid() return isValid()
&& impl().canUndo(); and impl().canUndo();
} }

View file

@ -118,7 +118,7 @@ namespace control {
, lib::Handle<CommandImpl> // actually implemented as ref counting Handle , lib::Handle<CommandImpl> // actually implemented as ref counting Handle
> // > //
{ {
typedef lib::Handle<CommandImpl> _Handle; using _Handle = lib::Handle<CommandImpl>;
public: public:
/* === command registry === */ /* === command registry === */
@ -300,8 +300,8 @@ namespace control {
inline bool inline bool
operator== (Command const& c1, Command const& c2) operator== (Command const& c1, Command const& c2)
{ {
return (!c1 && !c2) return (!c1 and !c2)
|| ( c1 && c2 && (&c1.impl() == &c2.impl())); or ( c1 and c2 and (&c1.impl() == &c2.impl()));
} }
inline bool inline bool
@ -314,8 +314,8 @@ namespace control {
inline bool inline bool
operator< (Command const& c1, Command const& c2) operator< (Command const& c1, Command const& c2)
{ {
return (!c1 && c2) return (!c1 and c2)
|| ( c1 && c2 && (&c1.impl() < &c2.impl())); or ( c1 and c2 and (&c1.impl() < &c2.impl()));
} }

View file

@ -437,7 +437,7 @@ namespace engine {
*/ */
class Table class Table
{ {
typedef std::unordered_map<HashVal,Entry> MetadataStore; using MetadataStore = std::unordered_map<HashVal,Entry>;
MetadataStore entries_; MetadataStore entries_;

View file

@ -214,7 +214,7 @@ namespace engine {
/** @internal abort normal lifecycle, reset the underlying buffer and detach from it. /** @internal abort normal lifecycle, reset the underlying buffer and detach from it.
* This allows to break out of normal usage and reset the handle to \em invalid state * This allows to break out of normal usage and reset the handle to _invalid state_
* @param invokeDtor if possibly the clean-up function of an TypeHandler registered with * @param invokeDtor if possibly the clean-up function of an TypeHandler registered with
* the buffer metadata should be invoked prior to resetting the metadata state. * the buffer metadata should be invoked prior to resetting the metadata state.
* Default is \em not to invoke anything * Default is \em not to invoke anything

View file

@ -117,7 +117,7 @@ namespace engine {
public: public:
typedef Buff* PBuff; using PBuff = Buff*;
/** @internal a buffer handle may be obtained by "locking" /** @internal a buffer handle may be obtained by "locking"
* a buffer from the corresponding BufferProvider */ * a buffer from the corresponding BufferProvider */
@ -155,7 +155,7 @@ namespace engine {
isValid() const isValid() const
{ {
return bool(pBuffer_) return bool(pBuffer_)
&& descriptor_.verifyValidity(); and descriptor_.verifyValidity();
} }
HashVal HashVal

View file

@ -56,8 +56,8 @@ namespace engine {
*/ */
struct BuffTable struct BuffTable
{ {
typedef BuffHandle * PHa; using PHa = BuffHandle *;
typedef BuffHandle::PBuff * PBu; using PBu = BuffHandle::PBuff *;
struct StorageChunk struct StorageChunk
{ }; { };
@ -80,8 +80,8 @@ namespace engine {
void lockBuffers(); void lockBuffers();
void releaseBuffers(); void releaseBuffers();
typedef vector<BuffHandle> BuffHandleTable; using BuffHandleTable = vector<BuffHandle>;
typedef lib::RangeIter<BuffHandleTable::iterator> iterator; using iterator = lib::RangeIter<BuffHandleTable::iterator>;
iterator buffers(); iterator buffers();
iterator inBuffers(); iterator inBuffers();

View file

@ -117,7 +117,7 @@ namespace engine{
}; };
typedef std::vector<CalcStream> CalcStreams; //////////////////////////////////////////////////////TICKET #1297 : probably unnecessary, since we intend to connect always one Feed per ModelPort (and handle multiple channels internally, in the processing nodes) using CalcStreams = std::vector<CalcStream>; //////////////////////////////////////////////////////TICKET #1297 : probably unnecessary, since we intend to connect always one Feed per ModelPort (and handle multiple channels internally, in the processing nodes)

View file

@ -73,7 +73,7 @@ namespace engine{
using mobject::ModelPort; using mobject::ModelPort;
using steam::play::Timings; using steam::play::Timings;
typedef steam::play::OutputSlot::Allocation OutputConnection; using OutputConnection = steam::play::OutputSlot::Allocation;
@ -117,8 +117,8 @@ namespace engine{
}; };
typedef lib::polyvalue::CloneValueSupport<Quality> _Clonable_QoS_Strategy; using _Clonable_QoS_Strategy = lib::polyvalue::CloneValueSupport<Quality>;
typedef lib::PolymorphicValue<Quality, QoS_IMPL_SIZE, _Clonable_QoS_Strategy> QoS_Definition; using QoS_Definition = lib::PolymorphicValue<Quality, QoS_IMPL_SIZE, _Clonable_QoS_Strategy>;
static QoS_Definition QoS_DEFAULT; static QoS_Definition QoS_DEFAULT;
static QoS_Definition QoS_BACKGROUND; static QoS_Definition QoS_BACKGROUND;

View file

@ -38,7 +38,7 @@ namespace session {
class Clip; class Clip;
class Effect; class Effect;
typedef Placement<Effect> PEffect; using PEffect = Placement<Effect>;
// TODO: class Transition; // TODO: class Transition;
}} // namespace mobject::session }} // namespace mobject::session

View file

@ -103,7 +103,7 @@ namespace engine {
class BlockPool; class BlockPool;
typedef std::unordered_map<HashVal,BlockPool> PoolTable; using PoolTable = std::unordered_map<HashVal,BlockPool>;
} }

View file

@ -103,7 +103,7 @@ namespace engine {
*/ */
struct TypeHandler struct TypeHandler
{ {
typedef function<void(void*)> DoInBuffer; using DoInBuffer = function<void(void*)>;
DoInBuffer createAttached; DoInBuffer createAttached;
DoInBuffer destroyAttached; DoInBuffer destroyAttached;
@ -166,7 +166,7 @@ namespace engine {
operator== (TypeHandler const& left, TypeHandler const& right) operator== (TypeHandler const& left, TypeHandler const& right)
{ {
return (not left.isValid() and not right.isValid()) return (not left.isValid() and not right.isValid())
|| (left.identity == right.identity); or (left.identity == right.identity);
} }
friend bool friend bool
operator!= (TypeHandler const& left, TypeHandler const& right) operator!= (TypeHandler const& left, TypeHandler const& right)

View file

@ -54,7 +54,7 @@ namespace node {
class DummyTickService class DummyTickService
: lib::ThreadJoinable<> : lib::ThreadJoinable<>
{ {
typedef function<void(void)> Tick; using Tick = function<void(void)>;
std::atomic_uint timespan_; std::atomic_uint timespan_;
/** poll interval for new settings in wait state */ /** poll interval for new settings in wait state */
@ -89,8 +89,8 @@ namespace node {
void activate (uint fps) void activate (uint fps)
{ {
REQUIRE ( 0==fps REQUIRE ( 0==fps
||( 1000000/fps < std::numeric_limits<uint>::max() or( 1000000/fps < std::numeric_limits<uint>::max()
&& 1000000/fps > POLL_TIMEOUT)); and 1000000/fps > POLL_TIMEOUT));
if (fps) if (fps)
timespan_ = 1000000/fps; // microseconds per tick timespan_ = 1000000/fps; // microseconds per tick
else else

View file

@ -55,8 +55,8 @@ namespace external {
using lib::Symbol; using lib::Symbol;
typedef StreamType::ImplFacade ImplFacade; using ImplFacade = StreamType::ImplFacade;
typedef StreamType::ImplFacade::TypeTag TypeTag; using TypeTag = StreamType::ImplFacade::TypeTag;
class LibGavl; class LibGavl;

View file

@ -59,8 +59,8 @@ namespace fixture {
: util::NonCopyable : util::NonCopyable
{ {
typedef ID<Pipe> PID; using PID = ID<Pipe>;
// typedef ID<Struct> StID; // using StID = ID<Struct>;
public: public:

View file

@ -107,7 +107,7 @@ namespace fixture {
ModelPortRegistry::contains (ID<Pipe> key) const ModelPortRegistry::contains (ID<Pipe> key) const
{ {
return bool(key) return bool(key)
&& util::contains (transaction_, key); and util::contains (transaction_, key);
} }
@ -121,7 +121,7 @@ namespace fixture {
ModelPortRegistry::isRegistered (ID<Pipe> key) const ModelPortRegistry::isRegistered (ID<Pipe> key) const
{ {
return bool(key) return bool(key)
&& util::contains (currentReg_, key); and util::contains (currentReg_, key);
} }

View file

@ -122,7 +122,7 @@ namespace fixture {
private: private:
static lib::OptionalRef<ModelPortRegistry> theGlobalRegistry; static lib::OptionalRef<ModelPortRegistry> theGlobalRegistry;
typedef std::map<PID, ModelPortDescriptor> MPTable; using MPTable = std::map<PID, ModelPortDescriptor>;
MPTable currentReg_; MPTable currentReg_;
MPTable transaction_; MPTable transaction_;

View file

@ -216,7 +216,7 @@ namespace mobject {
{ {
PlacementRef<MO> newRef (pRefID); PlacementRef<MO> newRef (pRefID);
if (isValid() && pRef_ == newRef ) if (isValid() and pRef_ == newRef)
return *this; // self assignment detected return *this; // self assignment detected
else else
return activate (*newRef); // STRONG exception safe return activate (*newRef); // STRONG exception safe
@ -263,7 +263,7 @@ namespace mobject {
isValid() const isValid() const
{ {
return _Handle::isValid() return _Handle::isValid()
&& pRef_.isValid(); and pRef_.isValid();
} }
size_t size_t
@ -277,7 +277,7 @@ namespace mobject {
isCompatible() const isCompatible() const
{ {
return pRef_ return pRef_
&& (*pRef_).template isCompatible<MOX>(); and (*pRef_).template isCompatible<MOX>();
} }
operator string() const ///////////////////////TICKET #527 #528 should be better integrated with the other object types operator string() const ///////////////////////TICKET #527 #528 should be better integrated with the other object types
@ -296,7 +296,7 @@ namespace mobject {
operator== (MORef<MOX> const& oRef) const operator== (MORef<MOX> const& oRef) const
{ {
return isValid() return isValid()
&& oRef == this->pRef_; and oRef == this->pRef_;
} }
template<class MOX> template<class MOX>
@ -369,8 +369,8 @@ namespace mobject {
inline bool inline bool
isSharedPointee (MORef<MOX> const& ref1, MORef<MOY> const& ref2) isSharedPointee (MORef<MOX> const& ref1, MORef<MOY> const& ref2)
{ {
return ref1.isValid() && ref2.isValid() return ref1.isValid() and ref2.isValid()
&& isSharedPointee (ref1.getPlacement(), ref2.getPlacement()); and isSharedPointee (ref1.getPlacement(), ref2.getPlacement());
} }
/** check if the two references actually denote an equivalent placement */ /** check if the two references actually denote an equivalent placement */
@ -378,8 +378,8 @@ namespace mobject {
inline bool inline bool
isEquivalentPlacement (MORef<MOX> const& ref1, MORef<MOY> const& ref2) isEquivalentPlacement (MORef<MOX> const& ref1, MORef<MOY> const& ref2)
{ {
return ref1.isValid() && ref2.isValid() return ref1.isValid() and ref2.isValid()
&& isSameDef (ref1.getPlacement(), ref2.getPlacement()); and isSameDef (ref1.getPlacement(), ref2.getPlacement());
} }

View file

@ -227,7 +227,7 @@ namespace steam {
checkValidity () const checkValidity () const
{ {
return session::SessionServiceFetch::isAccessible() // session interface opened? return session::SessionServiceFetch::isAccessible() // session interface opened?
&& session::SessionServiceFetch::isRegisteredID (this->id_); and session::SessionServiceFetch::isRegisteredID (this->id_);
} }
static void static void
@ -260,7 +260,7 @@ namespace steam {
static PlacementMX& static PlacementMX&
access (_Id const& placementID) access (_Id const& placementID)
{ {
if (!placementID) if (not placementID)
throw error::Logic{"Attempt to access a NIL PlacementRef" throw error::Logic{"Attempt to access a NIL PlacementRef"
, LERR_(BOTTOM_PLACEMENTREF)}; , LERR_(BOTTOM_PLACEMENTREF)};

View file

@ -68,8 +68,8 @@ namespace mobject {
isSameDef (PlacementMO const& pl1, PlacementMO const& pl2) isSameDef (PlacementMO const& pl1, PlacementMO const& pl2)
{ {
return pl1.getID() == pl2.getID() return pl1.getID() == pl2.getID()
|| pl1.chain == pl2.chain or pl1.chain == pl2.chain
; ;
} }

View file

@ -39,8 +39,8 @@ namespace session {
using asset::Media; using asset::Media;
using lib::time::TimeVar; using lib::time::TimeVar;
typedef lib::P<Media> PMedia; using PMedia = lib::P<Media>;
typedef lib::P<asset::Clip> PClipAsset; using PClipAsset = lib::P<asset::Clip>;
/** /**

View file

@ -74,7 +74,7 @@ namespace session {
REQUIRE (newLp); REQUIRE (newLp);
REQUIRE (!newLp->next_, "can insert only single LocatingPins"); REQUIRE (!newLp->next_, "can insert only single LocatingPins");
if (next_ && newLp->getPrioLevel() > next_->getPrioLevel()) if (next_ and newLp->getPrioLevel() > next_->getPrioLevel())
return next_->addChain (newLp); return next_->addChain (newLp);
else else
{ {
@ -120,7 +120,7 @@ namespace session {
if (!solution.still_to_solve()) if (!solution.still_to_solve())
return; return;
this->intersect (solution); this->intersect (solution);
if (next_ && solution.still_to_solve()) if (next_ and solution.still_to_solve())
next_->resolve(solution); next_->resolve(solution);
} }
@ -156,7 +156,7 @@ namespace session {
bool bool
LocatingPin::LocatingSolution::is_definite() ///< found a solution? LocatingPin::LocatingSolution::is_definite() ///< found a solution?
{ {
return (minTime == maxTime && minTrack == maxTrack); return (minTime == maxTime and minTrack == maxTrack);
} }
bool bool

View file

@ -41,7 +41,7 @@ namespace asset {
class Effect; class Effect;
class Sequence; class Sequence;
typedef lib::P<Sequence> PSequence; using PSequence = lib::P<Sequence>;
} }

View file

@ -119,7 +119,7 @@ namespace session {
bool bool
exhausted() exhausted()
{ {
while (!scopes_.empty() && !scopes_.top()) while (not scopes_.empty() and not scopes_.top())
scopes_.pop(); scopes_.pop();
return scopes_.empty(); return scopes_.empty();
} }
@ -127,7 +127,7 @@ namespace session {
Pla& Pla&
step () step ()
{ {
REQUIRE (!scopes_.empty() && scopes_.top()); REQUIRE (not scopes_.empty() and scopes_.top());
Pla& pos = *scopes_.top(); Pla& pos = *scopes_.top();
++scopes_.top(); ++scopes_.top();
scopes_.push(index_.getReferrers(pos.getID())); scopes_.push(index_.getReferrers(pos.getID()));
@ -323,15 +323,15 @@ namespace session {
PlacementIndexQueryResolver::canHandleQuery(QID qID) const PlacementIndexQueryResolver::canHandleQuery(QID qID) const
{ {
return qID.kind == Goal::DISCOVERY return qID.kind == Goal::DISCOVERY
&&( qID.type == getResultTypeID<Placement<MObject>>() and( qID.type == getResultTypeID<Placement<MObject>>()
||qID.type == getResultTypeID<Placement<Clip>>() or qID.type == getResultTypeID<Placement<Clip>>()
||qID.type == getResultTypeID<Placement<Effect>>() or qID.type == getResultTypeID<Placement<Effect>>()
/////////////////////////////////////////////////////////////////TICKET #414 /////////////////////////////////////////////////////////////////TICKET #414
||qID.type == getResultTypeID<Placement<mobject::test::DummyMO >>() or qID.type == getResultTypeID<Placement<mobject::test::DummyMO >>()
||qID.type == getResultTypeID<Placement<mobject::test::TestSubMO1 >>() or qID.type == getResultTypeID<Placement<mobject::test::TestSubMO1 >>()
||qID.type == getResultTypeID<Placement<mobject::test::TestSubMO2 >>() or qID.type == getResultTypeID<Placement<mobject::test::TestSubMO2 >>()
||qID.type == getResultTypeID<Placement<mobject::test::TestSubMO21>>() or qID.type == getResultTypeID<Placement<mobject::test::TestSubMO21>>()
/////////////////////////////////////////////////////////////////TICKET #532 /////////////////////////////////////////////////////////////////TICKET #532
); );
} }

View file

@ -90,9 +90,9 @@ namespace session {
/* some type shorthands */ /* some type shorthands */
typedef mobject::PlacementMO PlacementMO; using PlacementMO = mobject::PlacementMO;
typedef PlacementIndex::PRef PRef; using PRef = PlacementIndex::PRef;
typedef PlacementIndex::ID ID; using ID = PlacementIndex::ID ;
/*****************************************************************//** /*****************************************************************//**
@ -104,7 +104,7 @@ namespace session {
*/ */
class PlacementIndex::Table class PlacementIndex::Table
{ {
typedef shared_ptr<PlacementMO> PPlacement; using PPlacement = shared_ptr<PlacementMO>;
struct PlacementEntry struct PlacementEntry
{ {
@ -113,11 +113,11 @@ namespace session {
}; };
// using hashtables to implement the index // using hashtables to implement the index
typedef PlacementMO::ID PID; using PID = PlacementMO::ID;
typedef unordered_map<PID, PlacementEntry> IDTable; using IDTable = std::unordered_map<PID, PlacementEntry>;
typedef std::unordered_multimap<PID,PID> ScopeTable; using ScopeTable = std::unordered_multimap<PID,PID>;
typedef pair<ScopeIter, ScopeIter> ScopeContents; using ScopeContents = pair<ScopeIter, ScopeIter>;
TypedAllocationManager allocator_; TypedAllocationManager allocator_;
@ -313,7 +313,7 @@ namespace session {
private: private:
typedef IDTable::const_iterator Slot; using Slot = IDTable::const_iterator;
PlacementEntry const& PlacementEntry const&
base_entry (ID key) const base_entry (ID key) const
@ -338,7 +338,7 @@ namespace session {
void void
remove_from_scope (ID scopeID, ID entryID) remove_from_scope (ID scopeID, ID entryID)
{ {
typedef ScopeTable::const_iterator Pos; using Pos = ScopeTable::const_iterator;
pair<Pos,Pos> searchRange = scopeTab_.equal_range(scopeID); pair<Pos,Pos> searchRange = scopeTab_.equal_range(scopeID);
Pos pos = searchRange.first; Pos pos = searchRange.first;
@ -356,13 +356,13 @@ namespace session {
void void
remove_all_from_scope (ID scopeID) remove_all_from_scope (ID scopeID)
{ {
typedef ScopeTable::const_iterator Pos; using Pos = ScopeTable::const_iterator;
pair<Pos,Pos> scopeEntries = scopeTab_.equal_range(scopeID); pair<Pos,Pos> scopeEntries = scopeTab_.equal_range(scopeID);
Pos first = scopeEntries.first; Pos first = scopeEntries.first;
Pos end = scopeEntries.second; Pos end = scopeEntries.second;
// take a snapshot of all children to be processed recursively // take a snapshot of all children to be processed recursively
typedef IterSnapshot<PID> ChildIDs; using ChildIDs = IterSnapshot<PID>;
ChildIDs child (eachVal(first,end)); ChildIDs child (eachVal(first,end));
scopeTab_.erase (first,end); // assumed to be NOP for first==end scopeTab_.erase (first,end); // assumed to be NOP for first==end
@ -395,7 +395,7 @@ namespace session {
} }
typedef function<PlacementMO& (pair<PID,PID> const&)> ElementResolver; using ElementResolver = function<PlacementMO& (pair<PID,PID> const&)>;
mutable ElementResolver elementResolver_; mutable ElementResolver elementResolver_;
ElementResolver ElementResolver
@ -614,8 +614,8 @@ namespace session {
PMO& theElement = *elm(id); PMO& theElement = *elm(id);
ID theScope (sco(id)->getID()); ID theScope (sco(id)->getID());
if (theScope == id if ( theScope == id
&& elm(id)==tab._root_4check() and elm(id)==tab._root_4check()
) // no need to check root, ) // no need to check root,
return; // because root is it's own scope return; // because root is it's own scope
@ -635,7 +635,7 @@ namespace session {
PMO* root = tab._root_4check(); PMO* root = tab._root_4check();
PMO* scope = sco(id); PMO* scope = sco(id);
while (scope && scope != sco(scope->getID())) while (scope and scope != sco(scope->getID()))
scope = sco(scope->getID()); scope = sco(scope->getID());
VERIFY ( root==scope, "(2.4) Scopes", "Found a scope not attached below root."); VERIFY ( root==scope, "(2.4) Scopes", "Found a scope not attached below root.");

View file

@ -152,8 +152,8 @@ namespace session {
template<typename MO, typename BMO> template<typename MO, typename BMO>
struct BuildID<Placement<MO,BMO>> struct BuildID<Placement<MO,BMO>>
{ {
typedef PlacementMO::Id<MO> Type; using Type = PlacementMO::Id<MO>;
typedef MO Target; using Target = MO ;
}; };

View file

@ -125,7 +125,7 @@ namespace session {
QueryFocusStack::push (Scope const& newStartPoint) QueryFocusStack::push (Scope const& newStartPoint)
{ {
ScopePath newPathFrame (newStartPoint); // may throw ScopePath newPathFrame (newStartPoint); // may throw
ENSURE (newPathFrame.isValid() || newStartPoint.isRoot()); ENSURE (newPathFrame.isValid() or newStartPoint.isRoot());
paths_.push_back (newPathFrame); paths_.push_back (newPathFrame);
ENSURE (0 < size()); ENSURE (0 < size());
@ -141,7 +141,7 @@ namespace session {
QueryFocusStack::top () QueryFocusStack::top ()
{ {
if ( 0 == size() if ( 0 == size()
|| 0 == paths_.back().ref_count() or 0 == paths_.back().ref_count()
) )
pop_unused(); pop_unused();
@ -160,10 +160,10 @@ namespace session {
void void
QueryFocusStack::pop_unused () QueryFocusStack::pop_unused ()
{ {
if (1 == size() && !paths_.front().isValid()) if (1 == size() and not paths_.front().isValid())
return; // unnecessary to evict a base frame repeatedly return; // unnecessary to evict a base frame repeatedly
while (size() && (0 == paths_.back().ref_count())) while (size() and (0 == paths_.back().ref_count()))
paths_.pop_back(); paths_.pop_back();
if (0 == size()) if (0 == size())
@ -183,8 +183,8 @@ namespace session {
paths_.resize(1); paths_.resize(1);
ENSURE (!paths_.front().empty()); ENSURE (not paths_.front().empty());
ENSURE (!paths_.front().isValid()); // i.e. just root scope ENSURE (not paths_.front().isValid()); // i.e. just root scope
} }

View file

@ -65,7 +65,7 @@ namespace session {
namespace { namespace {
typedef std::pair<const QueryKey, any> AnyPair; using AnyPair = std::pair<const QueryKey, any>;
/** helper to simplify creating mock table entries, wrapped correctly */ /** helper to simplify creating mock table entries, wrapped correctly */
template<class TY> template<class TY>
@ -78,7 +78,7 @@ namespace session {
template<class STRU> template<class STRU>
AnyPair entry_Struct(Literal caps) AnyPair entry_Struct(Literal caps)
{ {
typedef typename WrapReturn<STRU>::Wrapper Ptr; using Ptr = typename WrapReturn<STRU>::Wrapper;
string capabilities (caps); string capabilities (caps);
Query<STRU> query (capabilities); Query<STRU> query (capabilities);
@ -99,7 +99,7 @@ namespace session {
INFO (config, "creating mock answers for some hard wired config queries..."); INFO (config, "creating mock answers for some hard wired config queries...");
isInit_ = true; // allow re-entrance isInit_ = true; // allow re-entrance
typedef const ProcPatt cPP; using cPP = const ProcPatt;
// for baiscpipetest.cpp --------- // for baiscpipetest.cpp ---------
@ -137,7 +137,7 @@ namespace session {
bool bool
MockTable::fabricate_matching_new_Pipe (Query<Pipe> const& q, string const& pipeID, string const& streamID) MockTable::fabricate_matching_new_Pipe (Query<Pipe> const& q, string const& pipeID, string const& streamID)
{ {
typedef WrapReturn<Pipe>::Wrapper Ptr; using Ptr = WrapReturn<Pipe>::Wrapper;
Ptr newPipe (Struct::retrieve.newPipe (pipeID, streamID)); Ptr newPipe (Struct::retrieve.newPipe (pipeID, streamID));
answer_.insert (entry<Pipe> (q, newPipe)); answer_.insert (entry<Pipe> (q, newPipe));
@ -148,7 +148,7 @@ namespace session {
bool bool
MockTable::fabricate_just_new_Pipe (Query<Pipe> const& q ) MockTable::fabricate_just_new_Pipe (Query<Pipe> const& q )
{ {
typedef WrapReturn<Pipe>::Wrapper Ptr; using Ptr = WrapReturn<Pipe>::Wrapper;
Ptr newPipe (Struct::retrieve.made4fake (q)); Ptr newPipe (Struct::retrieve.made4fake (q));
answer_.insert (entry<Pipe> (q, newPipe)); answer_.insert (entry<Pipe> (q, newPipe));
@ -174,8 +174,8 @@ namespace session {
bool bool
MockTable::fabricate_Timeline_on_demand (Query<asset::Timeline> const& query) MockTable::fabricate_Timeline_on_demand (Query<asset::Timeline> const& query)
{ {
typedef asset::Timeline aTL; using aTL = asset::Timeline;
typedef WrapReturn<aTL>::Wrapper Ptr; using Ptr = WrapReturn<aTL>::Wrapper;
string nameID = query.extractID("id"); string nameID = query.extractID("id");
if (isnil (nameID)) if (isnil (nameID))
@ -210,8 +210,8 @@ namespace session {
bool bool
MockTable::fabricate_Sequence_on_demand (Query<asset::Sequence> const& query) MockTable::fabricate_Sequence_on_demand (Query<asset::Sequence> const& query)
{ {
typedef asset::Sequence aSeq; using aSeq = asset::Sequence;
typedef WrapReturn<aSeq>::Wrapper Ptr; using Ptr = WrapReturn<aSeq>::Wrapper;
string nameID = query.extractID("id"); string nameID = query.extractID("id");
if (isnil (nameID)) if (isnil (nameID))

View file

@ -82,10 +82,10 @@ namespace session {
/** a traits-class to define the smart-ptr to wrap the result */ /** a traits-class to define the smart-ptr to wrap the result */
template<class TY> template<class TY>
struct WrapReturn { typedef P<TY> Wrapper; }; struct WrapReturn { using Wrapper = P<TY>; };
template<> template<>
struct WrapReturn<ProcPatt> { typedef PProcPatt Wrapper; }; struct WrapReturn<ProcPatt> { using Wrapper = PProcPatt; };
/** helper detecting if a query actually intended to retrieve a "default" object. /** helper detecting if a query actually intended to retrieve a "default" object.
@ -121,7 +121,7 @@ namespace session {
class MockTable class MockTable
: public steam::ConfigResolver : public steam::ConfigResolver
{ {
typedef std::map<QueryKey,any> Tab; using Tab = std::map<QueryKey,any>;
Tab answer_; Tab answer_;
bool isInit_; bool isInit_;
@ -185,7 +185,7 @@ namespace session {
{ {
Ret const& candidate (any_cast<Ret const&> (entry)); Ret const& candidate (any_cast<Ret const&> (entry));
if (! solution if (! solution
||(solution && solution == candidate) // simulates a real unification or(solution and solution == candidate) // simulates a real unification
) )
return exists (solution = candidate); return exists (solution = candidate);
} }
@ -195,7 +195,7 @@ namespace session {
bool bool
try_special_case (Ret& solution, Query<TY> const& q) try_special_case (Ret& solution, Query<TY> const& q)
{ {
if (solution && isFakeBypass(q)) // backdoor for tests if (solution and isFakeBypass(q)) // backdoor for tests
return exists (solution); return exists (solution);
if (is_defaults_query (q)) if (is_defaults_query (q))
@ -230,13 +230,13 @@ namespace session {
const string pipeID = q.extractID("pipe"); const string pipeID = q.extractID("pipe");
const string streamID = q.extractID("stream"); const string streamID = q.extractID("stream");
if (candidate && pipeID == candidate->getPipeID()) if (candidate and pipeID == candidate->getPipeID())
return set_new_mock_solution (q, candidate); // "learn" this solution to be "valid" return set_new_mock_solution (q, candidate); // "learn" this solution to be "valid"
if (!isnil(pipeID) && !isnil(streamID)) if (!isnil(pipeID) and not isnil(streamID))
return fabricate_matching_new_Pipe (q, pipeID, streamID); return fabricate_matching_new_Pipe (q, pipeID, streamID);
if (!candidate && (!isnil(streamID) || !isnil(pipeID))) if (not candidate and (not isnil(streamID) or not isnil(pipeID)))
return fabricate_just_new_Pipe (q); return fabricate_just_new_Pipe (q);
return false; return false;
@ -248,7 +248,7 @@ namespace session {
{ {
const string streamID = q.extractID("stream"); const string streamID = q.extractID("stream");
if (!candidate && !isnil(streamID)) if (not candidate and not isnil(streamID))
return fabricate_ProcPatt_on_demand (q); return fabricate_ProcPatt_on_demand (q);
return false; return false;
} }

View file

@ -162,7 +162,7 @@ namespace session {
{ {
return (1 < length()) return (1 < length())
#if NOBUG_MODE_ALPHA #if NOBUG_MODE_ALPHA
&& hasValidRoot() and hasValidRoot()
#endif #endif
; ;
} }
@ -252,10 +252,10 @@ namespace session {
bool bool
disjoint (ScopePath const& path1, ScopePath const& path2) disjoint (ScopePath const& path1, ScopePath const& path2)
{ {
if (path1.empty() || path2.empty()) return false; if (path1.empty() or path2.empty()) return false;
return (path1.isValid() && path2.isValid()) return (path1.isValid() and path2.isValid())
&& (path1.path_[1] != path2.path_[1]) // no common prefix and (path1.path_[1] != path2.path_[1]) // no common prefix
; ;
} }

View file

@ -263,7 +263,7 @@ namespace session {
{ {
return (1 == size()) return (1 == size())
#if NOBUG_MODE_ALPHA #if NOBUG_MODE_ALPHA
&& path_[0].isRoot() and path_[0].isRoot()
#endif #endif
; ;
} }

View file

@ -141,7 +141,7 @@ namespace session {
if (index().contains (scope)) if (index().contains (scope))
index().clear (scope); index().clear (scope);
ENSURE (!index().contains (scope) || (scope == index().getRoot().getID())); ENSURE (!index().contains (scope) or (scope == index().getRoot().getID()));
ENSURE (siz >= index().size()); ENSURE (siz >= index().size());
return siz != index().size(); return siz != index().size();
} }
@ -222,7 +222,7 @@ namespace session {
PlacementIndex& PlacementIndex&
getPlacementIndex() getPlacementIndex()
{ {
if (mockIndex_ && mockIndex_->isValid()) if (mockIndex_ and mockIndex_->isValid())
return *mockIndex_; return *mockIndex_;
else else
return IMPL::getPlacementIndex(); return IMPL::getPlacementIndex();

View file

@ -58,7 +58,7 @@ namespace session {
SessionServiceFetch::isAccessible () SessionServiceFetch::isAccessible ()
{ {
return Session::initFlag return Session::initFlag
&& Session::current.isUp(); and Session::current.isUp();
} }
/** verify the given placement-ID (hash) is valid, /** verify the given placement-ID (hash) is valid,

View file

@ -102,11 +102,11 @@ namespace play {
Timings::isValid() const Timings::isValid() const
{ {
return bool(grid_) return bool(grid_)
&& (( (ASAP == playbackUrgency || NICE == playbackUrgency) and (( (ASAP == playbackUrgency or NICE == playbackUrgency)
&& Time::NEVER == scheduledDelivery) and Time::NEVER == scheduledDelivery)
|| or
(TIMEBOUND == playbackUrgency ( TIMEBOUND == playbackUrgency
&& Time::MIN < scheduledDelivery && scheduledDelivery < Time::MAX) and Time::MIN < scheduledDelivery and scheduledDelivery < Time::MAX)
); );
} }

View file

@ -36,7 +36,7 @@ namespace vault {
* Global access point for starting a script within Lumiera application * Global access point for starting a script within Lumiera application
* context. * context.
* *
* @todo build the (LUA,C)-script runner. * @todo build a suitable binding interface and a script runner.
* *
*/ */
struct ScriptRunnerFacade struct ScriptRunnerFacade

View file

@ -235,28 +235,28 @@ namespace test{
digi.installMutator (protocollingMutator, digi); digi.installMutator (protocollingMutator, digi);
digi = 12.3; digi = 12.3;
CHECK ( 0.0 == preval && 12.3 == newval); CHECK ( 0.0 == preval and 12.3 == newval);
digi += 10; digi += 10;
CHECK (12.3 == preval && 22.3 == newval); CHECK (12.3 == preval and 22.3 == newval);
digi -= 5; digi -= 5;
CHECK (22.3 == preval && 17.3 == newval); CHECK (22.3 == preval and 17.3 == newval);
++digi; ++digi;
CHECK (17.3 == preval && 18.3 == newval); CHECK (17.3 == preval and 18.3 == newval);
digi++; digi++;
CHECK (18.3 == preval && 19.3 == newval); CHECK (18.3 == preval and 19.3 == newval);
--digi; --digi;
CHECK (19.3 == preval && 18.3 == newval); CHECK (19.3 == preval and 18.3 == newval);
digi--; digi--;
CHECK (18.3 == preval && 17.3 == newval); CHECK (18.3 == preval and 17.3 == newval);
double val = ++digi; double val = ++digi;
CHECK (18.3 == digi && 18.3 == val); CHECK (18.3 == digi and 18.3 == val);
val = digi++; val = digi++;
CHECK (19.3 == digi && 18.3 == val); CHECK (19.3 == digi and 18.3 == val);
val = --digi; val = --digi;
CHECK (18.3 == digi && 18.3 == val); CHECK (18.3 == digi and 18.3 == val);
val = digi--; val = digi--;
CHECK (17.3 == digi && 18.3 == val); CHECK (17.3 == digi and 18.3 == val);
} }

View file

@ -137,7 +137,7 @@ namespace test{
seedRand(); seedRand();
TimeValue o (random_or_get (pop(arg))); TimeValue o (random_or_get (pop(arg)));
TimeValue c (random_or_get (pop(arg))); TimeValue c (random_or_get (pop(arg)));
CHECK (c!=Time::ZERO && o != c, "unsuitable testdata"); CHECK (c!=Time::ZERO and o != c, "unsuitable testdata");
// 25fps-grid, but with an time origin offset by 1/50sec // 25fps-grid, but with an time origin offset by 1/50sec
TimeGrid::build("test_grid_PAL", FrameRate::PAL, Time(FSecs(1,50))); TimeGrid::build("test_grid_PAL", FrameRate::PAL, Time(FSecs(1,50)));
@ -346,14 +346,14 @@ namespace test{
void void
____verify_nudged (TAR const& target, TAR const& refState, FrameCnt offsetSteps) ____verify_nudged (TAR const& target, TAR const& refState, FrameCnt offsetSteps)
{ {
CHECK (target != refState || !offsetSteps); CHECK (target != refState or not offsetSteps);
CHECK (target == Time(refState)+Time(FSecs(offsetSteps))); CHECK (target == Time(refState)+Time(FSecs(offsetSteps)));
} }
template<> template<>
void void
____verify_nudged (QuTime const& target, QuTime const& refState, FrameCnt offsetSteps) ____verify_nudged (QuTime const& target, QuTime const& refState, FrameCnt offsetSteps)
{ {
CHECK (target != refState || !offsetSteps); CHECK (target != refState or not offsetSteps);
CHECK (target == Time (materialise(refState)) CHECK (target == Time (materialise(refState))
+ Offset(offsetSteps, FrameRate::PAL)); + Offset(offsetSteps, FrameRate::PAL));
} }
@ -366,7 +366,7 @@ namespace test{
if (isDuration<SRC>()) if (isDuration<SRC>())
{ {
CHECK (materialise(target) == follower.receivedValue() CHECK (materialise(target) == follower.receivedValue()
|| Duration::NIL == follower.receivedValue() ); or Duration::NIL == follower.receivedValue() );
} }
else else
if (isQuTime<TAR>()) if (isQuTime<TAR>())

Some files were not shown because too many files have changed in this diff Show more