diff options
Diffstat (limited to 'libs/pbd/pbd')
38 files changed, 136 insertions, 136 deletions
diff --git a/libs/pbd/pbd/abstract_ui.cc b/libs/pbd/pbd/abstract_ui.cc index d2f8840b90..323435bdd9 100644 --- a/libs/pbd/pbd/abstract_ui.cc +++ b/libs/pbd/pbd/abstract_ui.cc @@ -43,7 +43,7 @@ template<typename RequestBuffer> void cleanup_request_buffer (void* ptr) { RequestBuffer* rb = (RequestBuffer*) ptr; - + /* this is called when the thread for which this request buffer was * allocated dies. That could be before or after the end of the UI * event loop for which this request buffer provides communication. @@ -54,7 +54,7 @@ cleanup_request_buffer (void* ptr) * a request. If the UI has finished processing requests, then * we will leak this buffer object. */ - + rb->dead = true; } @@ -127,7 +127,7 @@ AbstractUI<RequestObject>::register_thread (string target_gui, pthread_t thread_ when the thread exits, and ensures that the buffer is marked dead. it will then be deleted during a call to handle_ui_requests() */ - + per_thread_request_buffer.set (b); } @@ -229,7 +229,7 @@ AbstractUI<RequestObject>::handle_ui_requests () ++tmp; request_buffers.erase (i); i = tmp; - } else { + } else { ++i; } } @@ -264,7 +264,7 @@ AbstractUI<RequestObject>::handle_ui_requests () if (req->invalidation) { DEBUG_TRACE (PBD::DEBUG::AbstractUI, string_compose ("%1/%2 remove request from its invalidation list\n", name(), pthread_name())); - + /* after this call, if the object referenced by the * invalidation record is deleted, it will no longer * try to mark the request as invalid. @@ -283,7 +283,7 @@ AbstractUI<RequestObject>::handle_ui_requests () */ request_buffer_map_lock.unlock (); - + /* unlock the request lock while we execute the request, so * that we don't needlessly block other threads (note: not RT * threads since they have their own queue) from making requests. @@ -328,7 +328,7 @@ AbstractUI<RequestObject>::send_request (RequestObject *req) DEBUG_TRACE (PBD::DEBUG::AbstractUI, string_compose ("%1/%2 direct dispatch of request type %3\n", name(), pthread_name(), req->type)); do_request (req); delete req; - } else { + } else { /* If called from a different thread, we first check to see if * the calling thread is registered with this UI. If so, there @@ -374,7 +374,7 @@ AbstractUI<RequestObject>::call_slot (InvalidationRecord* invalidation, const bo } RequestObject *req = get_request (BaseUI::CallSlot); - + if (req == 0) { return; } @@ -384,7 +384,7 @@ AbstractUI<RequestObject>::call_slot (InvalidationRecord* invalidation, const bo /* copy semantics: copy the functor into the request object */ req->the_slot = f; - + /* the invalidation record is an object which will carry out * invalidation of any requests associated with it when it is * destroyed. it can be null. if its not null, associate this @@ -401,5 +401,5 @@ AbstractUI<RequestObject>::call_slot (InvalidationRecord* invalidation, const bo } send_request (req); -} +} diff --git a/libs/pbd/pbd/abstract_ui.h b/libs/pbd/pbd/abstract_ui.h index 060d05d37f..5491210db7 100644 --- a/libs/pbd/pbd/abstract_ui.h +++ b/libs/pbd/pbd/abstract_ui.h @@ -92,10 +92,10 @@ class ABSTRACT_UI_API AbstractUI : public BaseUI RequestBufferMap request_buffers; static Glib::Threads::Private<RequestBuffer> per_thread_request_buffer; - + Glib::Threads::Mutex request_list_lock; std::list<RequestObject*> request_list; - + RequestObject* get_request (RequestType); void handle_ui_requests (); void send_request (RequestObject *); diff --git a/libs/pbd/pbd/atomic_counter.h b/libs/pbd/pbd/atomic_counter.h index 019ff857f4..4b8c2e857a 100644 --- a/libs/pbd/pbd/atomic_counter.h +++ b/libs/pbd/pbd/atomic_counter.h @@ -63,7 +63,7 @@ public: { return g_atomic_int_dec_and_test (&m_value); } - + bool operator-- () { return decrement_and_test (); diff --git a/libs/pbd/pbd/base_ui.h b/libs/pbd/pbd/base_ui.h index eddaf862c5..ec2cf33678 100644 --- a/libs/pbd/pbd/base_ui.h +++ b/libs/pbd/pbd/base_ui.h @@ -57,7 +57,7 @@ class LIBPBD_API BaseUI : public sigc::trackable, public PBD::EventLoop std::string name() const { return _name; } bool ok() const { return _ok; } - + static RequestType new_request_type(); static RequestType CallSlot; static RequestType Quit; diff --git a/libs/pbd/pbd/command.h b/libs/pbd/pbd/command.h index 9feac6366a..337140e786 100644 --- a/libs/pbd/pbd/command.h +++ b/libs/pbd/pbd/command.h @@ -34,13 +34,13 @@ public: virtual ~Command() { /* NOTE: derived classes must call drop_references() */ } virtual void operator() () = 0; - + void set_name (const std::string& str) { _name = str; } const std::string& name() const { return _name; } virtual void undo() = 0; virtual void redo() { (*this)(); } - + virtual XMLNode &get_state(); virtual int set_state(const XMLNode&, int /*version*/) { /* noop */ return 0; } diff --git a/libs/pbd/pbd/compose.h b/libs/pbd/pbd/compose.h index 768820b61a..231afa583e 100644 --- a/libs/pbd/pbd/compose.h +++ b/libs/pbd/pbd/compose.h @@ -174,7 +174,7 @@ namespace StringPrivate } ++arg_no; - + return *this; } @@ -194,7 +194,7 @@ namespace StringPrivate else if (is_number(fmt[i + 1])) { // aha! a spec! // save string output.push_back(fmt.substr(b, i - b)); - + int n = 1; // number of digits int spec_no = 0; @@ -207,9 +207,9 @@ namespace StringPrivate spec_no /= 10; output_list::iterator pos = output.end(); --pos; // safe since we have just inserted a string> - + specs.insert(specification_map::value_type(spec_no, pos)); - + // jump over spec string i += n; b = i; diff --git a/libs/pbd/pbd/controllable.h b/libs/pbd/pbd/controllable.h index 257fe8dcab..235c4ce904 100644 --- a/libs/pbd/pbd/controllable.h +++ b/libs/pbd/pbd/controllable.h @@ -90,7 +90,7 @@ class LIBPBD_API Controllable : public PBD::StatefulDestructible { static PBD::Signal1<void,PBD::Controllable*> StopLearning; static PBD::Signal1<void,Controllable*> Destroyed; - + PBD::Signal0<void> Changed; int set_state (const XMLNode&, int version); diff --git a/libs/pbd/pbd/crossthread.h b/libs/pbd/pbd/crossthread.h index d9b80db48c..e87879e4a3 100644 --- a/libs/pbd/pbd/crossthread.h +++ b/libs/pbd/pbd/crossthread.h @@ -50,11 +50,11 @@ public: */ CrossThreadChannel(bool non_blocking); ~CrossThreadChannel(); - + /** Tell the listening thread that is has work to do. */ void wakeup(); - + /* if the listening thread cares about the precise message * it is being sent, then ::deliver() can be used to send * a single byte message rather than a simple wakeup. These diff --git a/libs/pbd/pbd/debug_rt_alloc.h b/libs/pbd/pbd/debug_rt_alloc.h index 0d1b4bd47c..43f62bd7da 100644 --- a/libs/pbd/pbd/debug_rt_alloc.h +++ b/libs/pbd/pbd/debug_rt_alloc.h @@ -34,7 +34,7 @@ LIBPBD_API extern int (*pbd_alloc_allowed) (); /** Call this to suspend malloc checking until a call to resume_rt_malloc_checks */ LIBPBD_API extern void suspend_rt_malloc_checks (); -/** Resume malloc checking after a suspension */ +/** Resume malloc checking after a suspension */ LIBPBD_API extern void resume_rt_malloc_checks (); } diff --git a/libs/pbd/pbd/destructible.h b/libs/pbd/pbd/destructible.h index 0c401a947f..261697cafa 100644 --- a/libs/pbd/pbd/destructible.h +++ b/libs/pbd/pbd/destructible.h @@ -29,7 +29,7 @@ class LIBPBD_API Destructible { public: Destructible() {} virtual ~Destructible () { Destroyed(); } - + PBD::Signal0<void> Destroyed; PBD::Signal0<void> DropReferences; diff --git a/libs/pbd/pbd/enumwriter.h b/libs/pbd/pbd/enumwriter.h index 405a187817..6f2333277d 100644 --- a/libs/pbd/pbd/enumwriter.h +++ b/libs/pbd/pbd/enumwriter.h @@ -40,7 +40,7 @@ class LIBPBD_API unknown_enumeration : public std::exception { } ~unknown_enumeration () throw() {} - + virtual const char *what() const throw() { return _message.c_str(); } diff --git a/libs/pbd/pbd/epa.h b/libs/pbd/pbd/epa.h index 89c085a5bc..8727fad08e 100644 --- a/libs/pbd/pbd/epa.h +++ b/libs/pbd/pbd/epa.h @@ -41,7 +41,7 @@ class LIBPBD_API EnvironmentalProtectionAgency { private: void clear () const; - + bool _armed; std::string _envname; std::map<std::string,std::string> e; diff --git a/libs/pbd/pbd/fastlog.h b/libs/pbd/pbd/fastlog.h index 21cbfbdce2..80b02e9522 100644 --- a/libs/pbd/pbd/fastlog.h +++ b/libs/pbd/pbd/fastlog.h @@ -25,9 +25,9 @@ static inline float fast_log2 (float val) x &= ~(255 << 23); x += 127 << 23; *exp_ptr = x; - + val = ((-1.0f/3) * t.f + 2) * t.f - 2.0f/3; - + return (val + log_2); } diff --git a/libs/pbd/pbd/fpu.h b/libs/pbd/pbd/fpu.h index 8be9e1a35b..045b633812 100644 --- a/libs/pbd/pbd/fpu.h +++ b/libs/pbd/pbd/fpu.h @@ -39,13 +39,13 @@ class LIBPBD_API FPU { static FPU* instance(); static void destroy(); - + bool has_flush_to_zero () const { return _flags & HasFlushToZero; } bool has_denormals_are_zero () const { return _flags & HasDenormalsAreZero; } bool has_sse () const { return _flags & HasSSE; } bool has_sse2 () const { return _flags & HasSSE2; } bool has_avx () const { return _flags & HasAVX; } - + private: Flags _flags; diff --git a/libs/pbd/pbd/functor_command.h b/libs/pbd/pbd/functor_command.h index 68092a77bb..9fc35ee138 100644 --- a/libs/pbd/pbd/functor_command.h +++ b/libs/pbd/pbd/functor_command.h @@ -71,7 +71,7 @@ class /*LIBPBD_API*/ FunctorCommand : public Command virtual XMLNode &get_state() { std::stringstream ss; - + XMLNode *node = new XMLNode("FunctorCommand"); node->add_property("type_name", typeid(obj_type).name()); node->add_property("functor", functor_name); diff --git a/libs/pbd/pbd/id.h b/libs/pbd/pbd/id.h index 05ac69e26d..1f33e6d732 100644 --- a/libs/pbd/pbd/id.h +++ b/libs/pbd/pbd/id.h @@ -56,7 +56,7 @@ class LIBPBD_API ID { void print (char* buf, uint32_t bufsize) const; std::string to_s() const; - + static uint64_t counter() { return _counter; } static void init_counter (uint64_t val) { _counter = val; } static void init (); diff --git a/libs/pbd/pbd/md5.h b/libs/pbd/pbd/md5.h index 8a5ee71aab..a02013eb72 100644 --- a/libs/pbd/pbd/md5.h +++ b/libs/pbd/pbd/md5.h @@ -32,14 +32,14 @@ class LIBPBD_API MD5 { public: MD5(); - + // an MD5 digest is a 16-byte number (32 hex digits) uint8_t digestRaw[16] ; - + // This version of the digest is actually // a "printf'd" version of the digest. char digestChars[33] ; - + void writeToString (); char* digestFile (char *filename); char* digestMemory (uint8_t const * memchunk, size_t len); @@ -53,14 +53,14 @@ class LIBPBD_API MD5 }; context_t context; - + void Init (); void Transform (uint32_t state[4], uint8_t const * block); void Encode (uint8_t *output, uint32_t const *input, size_t len); void Decode (uint32_t *output, uint8_t const * input, size_t len); void Update (uint8_t const *input, size_t inputLen); void Final (); - + }; #endif /* __libpbd_md5_h__ */ diff --git a/libs/pbd/pbd/memento_command.h b/libs/pbd/pbd/memento_command.h index 437f58631d..b6e0bc9cf3 100644 --- a/libs/pbd/pbd/memento_command.h +++ b/libs/pbd/pbd/memento_command.h @@ -84,7 +84,7 @@ public: void add_state (XMLNode* node) { node->add_property ("obj_id", _object.id().to_s()); } - + void object_died () { /* The object we are binding died, so drop references to ourselves */ this->drop_references (); @@ -116,7 +116,7 @@ public: /* The binder's object died, so we must die */ _binder->DropReferences.connect_same_thread (_binder_death_connection, boost::bind (&MementoCommand::binder_dying, this)); } - + ~MementoCommand () { drop_references (); delete before; @@ -152,13 +152,13 @@ public: XMLNode* node = new XMLNode(name); _binder->add_state (node); - + node->add_property ("type_name", _binder->type_name ()); if (before) { node->add_child_copy(*before); } - + if (after) { node->add_child_copy(*after); } diff --git a/libs/pbd/pbd/pool.h b/libs/pbd/pbd/pool.h index 8aff60fb6a..edc247332e 100644 --- a/libs/pbd/pbd/pool.h +++ b/libs/pbd/pbd/pool.h @@ -39,12 +39,12 @@ class LIBPBD_API Pool virtual void *alloc (); virtual void release (void *); - + std::string name() const { return _name; } guint available() const { return free_list.read_space(); } guint used() const { return free_list.bufsize() - available(); } guint total() const { return free_list.bufsize(); } - + protected: RingBuffer<void*> free_list; ///< a list of pointers to free items within block std::string _name; diff --git a/libs/pbd/pbd/properties.h b/libs/pbd/pbd/properties.h index f67fe50413..0ba42b8e55 100644 --- a/libs/pbd/pbd/properties.h +++ b/libs/pbd/pbd/properties.h @@ -99,7 +99,7 @@ public: /* MANAGEMENT OF Stateful State */ - + bool set_value (XMLNode const & node) { XMLProperty const* p = node.property (property_name()); @@ -120,9 +120,9 @@ public: node.add_property (property_name(), to_string (_current)); } - + /* MANAGEMENT OF HISTORY */ - + void clear_changes () { _have_old = false; } @@ -137,7 +137,7 @@ public: /* TRANSFERRING HISTORY TO / FROM A StatefulDiffCommand */ - + void get_changes_as_xml (XMLNode* history_node) const { XMLNode* node = history_node->add_child (property_name()); node->add_property ("from", to_string (_old)); @@ -225,7 +225,7 @@ public: Property<T>* clone () const { return new Property<T> (this->property_id(), this->_old, this->_current); } - + Property<T>* clone_from_xml (const XMLNode& node) const { XMLNodeList const & children = node.children (); XMLNodeList::const_iterator i = children.begin(); @@ -238,11 +238,11 @@ public: } XMLProperty* from = (*i)->property ("from"); XMLProperty* to = (*i)->property ("to"); - + if (!from || !to) { return 0; } - + return new Property<T> (this->property_id(), from_string (from->value()), from_string (to->value ())); } @@ -295,7 +295,7 @@ public: Property (PropertyDescriptor<std::string> d, std::string const & o, std::string const & c) : PropertyTemplate<std::string> (d, o, c) {} - + Property<std::string>* clone () const { return new Property<std::string> (this->property_id(), _old, _current); } @@ -356,12 +356,12 @@ class /*LIBPBD_API*/ SharedStatefulProperty : public PropertyBase { public: typedef boost::shared_ptr<T> Ptr; - + SharedStatefulProperty (PropertyID d, Ptr p) : PropertyBase (d) , _current (p) { - + } SharedStatefulProperty (PropertyID d, Ptr o, Ptr c) @@ -369,7 +369,7 @@ public: , _old (o) , _current (c) { - + } bool set_value (XMLNode const & node) { diff --git a/libs/pbd/pbd/property_basics.h b/libs/pbd/pbd/property_basics.h index c4e4549ecd..88f94fe211 100644 --- a/libs/pbd/pbd/property_basics.h +++ b/libs/pbd/pbd/property_basics.h @@ -32,7 +32,7 @@ class Command; namespace PBD { class LIBPBD_API PropertyList; -class LIBPBD_API StatefulDiffCommand; +class LIBPBD_API StatefulDiffCommand; /** A unique identifier for a property of a Stateful object */ typedef GQuark PropertyID; @@ -41,7 +41,7 @@ template<typename T> struct LIBPBD_TEMPLATE_API PropertyDescriptor { PropertyDescriptor () : property_id (0) {} PropertyDescriptor (PropertyID pid) : property_id (pid) {} - + PropertyID property_id; typedef T value_type; }; @@ -121,7 +121,7 @@ public: /** Invert the changes in this property */ virtual void invert () = 0; - + /* TRANSFERRING HISTORY TO / FROM A StatefulDiffCommand */ @@ -129,7 +129,7 @@ public: * StatefulDiffCommand node. */ virtual void get_changes_as_xml (XMLNode *) const = 0; - + /** If this Property has changed, clone it and add it to a given list. * Used for making StatefulDiffCommands. */ @@ -145,7 +145,7 @@ public: /* VARIOUS */ - + virtual PropertyBase* clone () const = 0; /** Set this property's current state from another */ @@ -158,12 +158,12 @@ public: return _property_id == pid; } -protected: +protected: /* copy construction only by subclasses */ PropertyBase (PropertyBase const & b) : _property_id (b._property_id) {} - + private: PropertyID _property_id; diff --git a/libs/pbd/pbd/property_list.h b/libs/pbd/pbd/property_list.h index 28b60b521e..9373d2c281 100644 --- a/libs/pbd/pbd/property_list.h +++ b/libs/pbd/pbd/property_list.h @@ -29,7 +29,7 @@ class XMLNode; namespace PBD { -/** A list of properties, mapped using their ID */ +/** A list of properties, mapped using their ID */ class LIBPBD_API PropertyList : public std::map<PropertyID, PropertyBase*> { public: diff --git a/libs/pbd/pbd/receiver.h b/libs/pbd/pbd/receiver.h index 2919063cbe..e7f3f25b0b 100644 --- a/libs/pbd/pbd/receiver.h +++ b/libs/pbd/pbd/receiver.h @@ -34,7 +34,7 @@ class LIBPBD_API Receiver : public sigc::trackable public: Receiver (); virtual ~Receiver (); - + void listen_to (Transmitter &); void hangup (); diff --git a/libs/pbd/pbd/ringbuffer.h b/libs/pbd/pbd/ringbuffer.h index 935beb0469..58c463ecbe 100644 --- a/libs/pbd/pbd/ringbuffer.h +++ b/libs/pbd/pbd/ringbuffer.h @@ -39,7 +39,7 @@ class /*LIBPBD_API*/ RingBuffer buf = new T[size]; reset (); } - + virtual ~RingBuffer() { delete [] buf; } @@ -55,7 +55,7 @@ class /*LIBPBD_API*/ RingBuffer g_atomic_int_set (&write_idx, w); g_atomic_int_set (&read_idx, r); } - + guint read (T *dest, guint cnt); guint write (T const * src, guint cnt); @@ -66,7 +66,7 @@ class /*LIBPBD_API*/ RingBuffer void get_read_vector (rw_vector *); void get_write_vector (rw_vector *); - + void decrement_read_idx (guint cnt) { g_atomic_int_set (&read_idx, (g_atomic_int_get(&read_idx) - cnt) & size_mask); } @@ -81,10 +81,10 @@ class /*LIBPBD_API*/ RingBuffer guint write_space () const { guint w, r; - + w = g_atomic_int_get (&write_idx); r = g_atomic_int_get (&read_idx); - + if (w > r) { return ((r - w + size) & size_mask) - 1; } else if (w < r) { @@ -93,13 +93,13 @@ class /*LIBPBD_API*/ RingBuffer return size - 1; } } - + guint read_space () const { guint w, r; - + w = g_atomic_int_get (&write_idx); r = g_atomic_int_get (&read_idx); - + if (w > r) { return w - r; } else { @@ -206,10 +206,10 @@ RingBuffer<T>::get_read_vector (typename RingBuffer<T>::rw_vector *vec) guint free_cnt; guint cnt2; guint w, r; - + w = g_atomic_int_get (&write_idx); r = g_atomic_int_get (&read_idx); - + if (w > r) { free_cnt = w - r; } else { @@ -230,9 +230,9 @@ RingBuffer<T>::get_read_vector (typename RingBuffer<T>::rw_vector *vec) vec->len[1] = cnt2 & size_mask; } else { - + /* Single part vector: just the rest of the buffer */ - + vec->buf[0] = &buf[r]; vec->len[0] = free_cnt; vec->buf[1] = 0; @@ -247,10 +247,10 @@ RingBuffer<T>::get_write_vector (typename RingBuffer<T>::rw_vector *vec) guint free_cnt; guint cnt2; guint w, r; - + w = g_atomic_int_get (&write_idx); r = g_atomic_int_get (&read_idx); - + if (w > r) { free_cnt = ((r - w + size) & size_mask) - 1; } else if (w < r) { @@ -258,11 +258,11 @@ RingBuffer<T>::get_write_vector (typename RingBuffer<T>::rw_vector *vec) } else { free_cnt = size - 1; } - + cnt2 = w + free_cnt; if (cnt2 > size) { - + /* Two part vector: the rest of the buffer after the current write ptr, plus some from the start of the buffer. diff --git a/libs/pbd/pbd/ringbufferNPT.h b/libs/pbd/pbd/ringbufferNPT.h index e700e89d2e..f01a6f3a16 100644 --- a/libs/pbd/pbd/ringbufferNPT.h +++ b/libs/pbd/pbd/ringbufferNPT.h @@ -40,7 +40,7 @@ class /*LIBPBD_API*/ RingBufferNPT buf = new T[size]; reset (); } - + virtual ~RingBufferNPT () { delete [] buf; } @@ -56,7 +56,7 @@ class /*LIBPBD_API*/ RingBufferNPT g_atomic_int_set (&write_ptr, w); g_atomic_int_set (&read_ptr, r); } - + size_t read (T *dest, size_t cnt); size_t write (const T *src, size_t cnt); @@ -67,7 +67,7 @@ class /*LIBPBD_API*/ RingBufferNPT void get_read_vector (rw_vector *); void get_write_vector (rw_vector *); - + void decrement_read_ptr (size_t cnt) { g_atomic_int_set (&read_ptr, (g_atomic_int_get(&read_ptr) - cnt) % size); } @@ -82,10 +82,10 @@ class /*LIBPBD_API*/ RingBufferNPT size_t write_space () { size_t w, r; - + w = g_atomic_int_get (&write_ptr); r = g_atomic_int_get (&read_ptr); - + if (w > r) { return ((r - w + size) % size) - 1; } else if (w < r) { @@ -94,13 +94,13 @@ class /*LIBPBD_API*/ RingBufferNPT return size - 1; } } - + size_t read_space () { size_t w, r; - + w = g_atomic_int_get (&write_ptr); r = g_atomic_int_get (&read_ptr); - + if (w > r) { return w - r; } else { @@ -204,10 +204,10 @@ RingBufferNPT<T>::get_read_vector (typename RingBufferNPT<T>::rw_vector *vec) size_t free_cnt; size_t cnt2; size_t w, r; - + w = g_atomic_int_get (&write_ptr); r = g_atomic_int_get (&read_ptr); - + if (w > r) { free_cnt = w - r; } else { @@ -228,9 +228,9 @@ RingBufferNPT<T>::get_read_vector (typename RingBufferNPT<T>::rw_vector *vec) vec->len[1] = cnt2 % size; } else { - + /* Single part vector: just the rest of the buffer */ - + vec->buf[0] = &buf[r]; vec->len[0] = free_cnt; vec->buf[1] = 0; @@ -244,10 +244,10 @@ RingBufferNPT<T>::get_write_vector (typename RingBufferNPT<T>::rw_vector *vec) size_t free_cnt; size_t cnt2; size_t w, r; - + w = g_atomic_int_get (&write_ptr); r = g_atomic_int_get (&read_ptr); - + if (w > r) { free_cnt = ((r - w + size) % size) - 1; } else if (w < r) { @@ -255,11 +255,11 @@ RingBufferNPT<T>::get_write_vector (typename RingBufferNPT<T>::rw_vector *vec) } else { free_cnt = size - 1; } - + cnt2 = w + free_cnt; if (cnt2 > size) { - + /* Two part vector: the rest of the buffer after the current write ptr, plus some from the start of the buffer. diff --git a/libs/pbd/pbd/search_path.h b/libs/pbd/pbd/search_path.h index 9f0d407751..41b1ffee55 100644 --- a/libs/pbd/pbd/search_path.h +++ b/libs/pbd/pbd/search_path.h @@ -86,12 +86,12 @@ public: * Add another directory path to the search path. */ LIBPBD_TEMPLATE_MEMBER_API Searchpath& operator+= (const std::string& directory_path); - + /** * Concatenate another Searchpath onto this. */ LIBPBD_TEMPLATE_MEMBER_API const Searchpath operator+ (const Searchpath& other); - + /** * Add another path to the search path. */ diff --git a/libs/pbd/pbd/selectable.h b/libs/pbd/pbd/selectable.h index cb4677cba4..ac8f72aa0d 100644 --- a/libs/pbd/pbd/selectable.h +++ b/libs/pbd/pbd/selectable.h @@ -66,7 +66,7 @@ class LIBPBD_API Selectable : public sigc::trackable fromPath, fromFILE }; - + bool _ok; int _type; std::string path; @@ -89,7 +89,7 @@ class LIBPBD_API Selector { void multithreaded (bool yn) { use_list_lock = yn; } - + void add (int condition, Selectable *s); void remove (Selectable *); int select (unsigned long usecs); diff --git a/libs/pbd/pbd/sequence_property.h b/libs/pbd/pbd/sequence_property.h index 5ab938b257..4069340e42 100644 --- a/libs/pbd/pbd/sequence_property.h +++ b/libs/pbd/pbd/sequence_property.h @@ -132,7 +132,7 @@ class /*LIBPBD_API*/ SequenceProperty : public PropertyBase bool changed () const { return !_changes.added.empty() || !_changes.removed.empty(); } - + void clear_changes () { _changes.added.clear (); _changes.removed.clear (); @@ -158,12 +158,12 @@ class /*LIBPBD_API*/ SequenceProperty : public PropertyBase if (!changed ()) { return; } - + /* Create a property with just the changes and not the actual values */ SequenceProperty<Container>* a = create (); a->_changes = _changes; changes.add (a); - + if (cmd) { /* whenever one of the items emits DropReferences, make sure that the Destructible we've been told to notify hears about @@ -182,7 +182,7 @@ class /*LIBPBD_API*/ SequenceProperty : public PropertyBase XMLNodeList const children = node.children (); /* find the node for this property name */ - + std::string const c = capitalize (property_name ()); XMLNodeList::const_iterator i = children.begin(); while (i != children.end() && (*i)->name() != c) { @@ -194,7 +194,7 @@ class /*LIBPBD_API*/ SequenceProperty : public PropertyBase } /* create a property with the changes */ - + SequenceProperty<Container>* p = create (); XMLNodeList const & grandchildren = (*i)->children (); @@ -301,7 +301,7 @@ class /*LIBPBD_API*/ SequenceProperty : public PropertyBase } _val.clear (); } - + typename Container::size_type size() const { return _val.size(); } @@ -355,12 +355,12 @@ protected: , _changes (p._changes) , _update_callback (p._update_callback) {} - + Container _val; ///< our actual container of things ChangeRecord _changes; ///< changes to the container (adds/removes) that have happened since clear_changes() was last called boost::function<void(const ChangeRecord&)> _update_callback; -private: +private: virtual SequenceProperty<Container>* create () const = 0; }; diff --git a/libs/pbd/pbd/signals.h b/libs/pbd/pbd/signals.h index cc70d07ca5..97cfa65300 100644 --- a/libs/pbd/pbd/signals.h +++ b/libs/pbd/pbd/signals.h @@ -115,9 +115,9 @@ public: return r; } }; - + typedef boost::shared_ptr<Connection> UnscopedConnection; - + class LIBPBD_API ScopedConnection { public: @@ -139,7 +139,7 @@ public: if (_c == o) { return *this; } - + disconnect (); _c = o; return *this; @@ -148,13 +148,13 @@ public: private: UnscopedConnection _c; }; - + class LIBPBD_API ScopedConnectionList : public boost::noncopyable { public: ScopedConnectionList(); virtual ~ScopedConnectionList (); - + void add_connection (const UnscopedConnection& c); void drop_connections (); @@ -168,7 +168,7 @@ class LIBPBD_API ScopedConnectionList : public boost::noncopyable (1) (unlikely) we make a connection involving a callback on the same object from 2 threads. (wouldn't that just be appalling programming style?) - + (2) where we are dropping connections in one thread and adding one from another. */ @@ -179,8 +179,8 @@ class LIBPBD_API ScopedConnectionList : public boost::noncopyable ConnectionList _list; }; -#include "pbd/signals_generated.h" - +#include "pbd/signals_generated.h" + } /* namespace */ #endif /* __pbd_signals_h__ */ diff --git a/libs/pbd/pbd/stacktrace.h b/libs/pbd/pbd/stacktrace.h index 754501eea7..17a719e9ae 100644 --- a/libs/pbd/pbd/stacktrace.h +++ b/libs/pbd/pbd/stacktrace.h @@ -90,9 +90,9 @@ class /*LIBPBD_API*/ thing_with_backtrace for (x = all.begin(); x != all.end(); ++x) { char **strings; size_t i; - + strings = backtrace_symbols ((*x)->allocation_backtrace, (*x)->allocation_backtrace_size); - + if (strings) { stream << "--- ALLOCATED SHARED_PTR @ " << (*x) << std::endl; for (i = 0; i < (*x)->allocation_backtrace_size && i < 50U; i++) { diff --git a/libs/pbd/pbd/stateful.h b/libs/pbd/pbd/stateful.h index 48f7f24d9a..0d0074210b 100644 --- a/libs/pbd/pbd/stateful.h +++ b/libs/pbd/pbd/stateful.h @@ -52,7 +52,7 @@ class LIBPBD_API Stateful { virtual bool apply_changes (PropertyBase const &); PropertyChange apply_changes (PropertyList const &); - + const OwnedPropertyList& properties() const { return *_properties; } void add_property (PropertyBase& s); @@ -101,7 +101,7 @@ class LIBPBD_API Stateful { void add_properties (XMLNode &); PropertyChange set_values (XMLNode const &); - + /* derived classes can implement this to do cross-checking of property values after either a PropertyList or XML driven property change. diff --git a/libs/pbd/pbd/stateful_diff_command.h b/libs/pbd/pbd/stateful_diff_command.h index 95ece8732a..ce82b5ee74 100644 --- a/libs/pbd/pbd/stateful_diff_command.h +++ b/libs/pbd/pbd/stateful_diff_command.h @@ -29,7 +29,7 @@ namespace PBD { -class StatefulDestructible; +class StatefulDestructible; class PropertyList; /** A Command which stores its action as the differences between the before and after diff --git a/libs/pbd/pbd/stl_delete.h b/libs/pbd/pbd/stl_delete.h index 3e9040bfad..492e9285f9 100644 --- a/libs/pbd/pbd/stl_delete.h +++ b/libs/pbd/pbd/stl_delete.h @@ -29,7 +29,7 @@ template<class T> /*LIBPBD_API*/ void vector_delete (std::vector<T *> *vec) { typename std::vector<T *>::iterator i; - + for (i = vec->begin(); i != vec->end(); i++) { delete *i; } @@ -79,7 +79,7 @@ template<class T> /*LIBPBD_API*/ void slist_delete (std::slist<T *> *l) template<class T> void /*LIBPBD_API*/ set_delete (std::set<T *> *sset) { typename std::set<T *>::iterator i; - + for (i = sset->begin(); i != sset->end(); i++) { delete *i; } diff --git a/libs/pbd/pbd/touchable.h b/libs/pbd/pbd/touchable.h index 797260882a..00c5896663 100644 --- a/libs/pbd/pbd/touchable.h +++ b/libs/pbd/pbd/touchable.h @@ -46,7 +46,7 @@ class /*LIBPBD_API*/ DynamicTouchable : public Touchable void touch () { (object.*method)(); } - + protected: T& object; void (T::*method)(void); @@ -62,7 +62,7 @@ class /*LIBPBD_API*/ DynamicTouchable1 : public Touchable void touch () { (object.*method)(arg); } - + protected: T1& object; void (T1::*method)(T2); @@ -79,12 +79,12 @@ class /*LIBPBD_API*/ DynamicTouchable2 : public Touchable void touch () { (object.*method)(arg1, arg2); } - + protected: T1& object; void (T1::*method)(T2,T3); T2 arg1; T3 arg2; }; - + #endif // __pbd_touchable_h__ diff --git a/libs/pbd/pbd/transmitter.h b/libs/pbd/pbd/transmitter.h index cf1e587dfd..a765f9e370 100644 --- a/libs/pbd/pbd/transmitter.h +++ b/libs/pbd/pbd/transmitter.h @@ -94,7 +94,7 @@ endmsg (std::ostream &ostr) /* hmm. not a Transmitter, so just put a newline on it and assume that that will be enough. */ - + ostr << std::endl; } diff --git a/libs/pbd/pbd/undo.h b/libs/pbd/pbd/undo.h index f248b8b657..01e1972e99 100644 --- a/libs/pbd/pbd/undo.h +++ b/libs/pbd/pbd/undo.h @@ -71,7 +71,7 @@ class LIBPBD_API UndoTransaction : public Command bool _clearing; friend void command_death (UndoTransaction*, Command *); - + void about_to_explicitly_delete (); }; @@ -80,14 +80,14 @@ class LIBPBD_API UndoHistory : public PBD::ScopedConnectionList public: UndoHistory(); ~UndoHistory() {} - + void add (UndoTransaction* ut); void undo (unsigned int n); void redo (unsigned int n); - + unsigned long undo_depth() const { return UndoList.size(); } unsigned long redo_depth() const { return RedoList.size(); } - + std::string next_undo() const { return (UndoList.empty() ? std::string() : UndoList.back()->name()); } std::string next_redo() const { return (RedoList.empty() ? std::string() : RedoList.back()->name()); } @@ -111,7 +111,7 @@ class LIBPBD_API UndoHistory : public PBD::ScopedConnectionList PBD::Signal0<void> Changed; PBD::Signal0<void> BeginUndoRedo; PBD::Signal0<void> EndUndoRedo; - + private: bool _clearing; uint32_t _depth; diff --git a/libs/pbd/pbd/unwind.h b/libs/pbd/pbd/unwind.h index 1e84d21b29..d4c43d05bd 100644 --- a/libs/pbd/pbd/unwind.h +++ b/libs/pbd/pbd/unwind.h @@ -29,7 +29,7 @@ class /*LIBPBD_API*/ Unwinder { public: Unwinder (T& var, T new_val) : _var (var), _old_val (var) { var = new_val; } ~Unwinder () { _var = _old_val; } - + private: T& _var; T _old_val; diff --git a/libs/pbd/pbd/xml++.h b/libs/pbd/pbd/xml++.h index 396280921c..8e0e015870 100644 --- a/libs/pbd/pbd/xml++.h +++ b/libs/pbd/pbd/xml++.h @@ -85,7 +85,7 @@ public: private: bool read_internal(bool validate); - + std::string _filename; XMLNode* _root; xmlDocPtr _doc; @@ -121,7 +121,7 @@ public: XMLProperty* property(const std::string&); const XMLProperty* property(const char* n) const { return const_cast<XMLNode*>(this)->property(n); } const XMLProperty* property(const std::string& n) const { return const_cast<XMLNode*>(this)->property(n); } - + XMLProperty* add_property(const char* name, const std::string& value); XMLProperty* add_property(const char* name, const char* value = ""); XMLProperty* add_property(const char* name, const long value); |