Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(604)

Unified Diff: lily/include/smobs.hh

Issue 549480043: Run scripts/auxiliar/fixcc.py (Closed)
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lily/include/small-smobs.hh ('k') | lily/include/source-file.hh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lily/include/smobs.hh
diff --git a/lily/include/smobs.hh b/lily/include/smobs.hh
index 5fd1ed660f134bf841708a7271f0b3b792ad48db..7be4199935f7719047f7372008ad2e1aaf5a86a9 100644
--- a/lily/include/smobs.hh
+++ b/lily/include/smobs.hh
@@ -147,7 +147,6 @@
- a static const * const type_p_name_ std::string set to something like
"ly:grob?". When provided, an accordingly named function for
checking for the given smob type will be available in Scheme.
-
*/
// Initialization class. Create a variable or static data member of
@@ -156,10 +155,11 @@
// Reference somewhere (like in the constructor of the containing
// class) to make sure the variable is actually instantiated.
-class Scm_init {
- static const Scm_init * list_;
- void (*const fun_)(void);
- Scm_init const * const next_;
+class Scm_init
+{
+ static const Scm_init *list_;
+ void (*const fun_) (void);
+ Scm_init const *const next_;
Scm_init (); // don't use default constructor, don't define
Scm_init (const Scm_init &); // don't define copy constructor
public:
@@ -213,7 +213,7 @@ private:
// Define type_p_name_ in the Super class as a const char * const.
// Without such definition it defaults to 0, producing no predicate.
- static const char * const type_p_name_; // = 0
+ static const char *const type_p_name_; // = 0
// LY_DECLARE_SMOB_PROC is used in the Super class definition for
// making a smob callable like a function. Its first argument is a
@@ -236,25 +236,25 @@ private:
// least, but in emergency situations one can always use a "rest"
// argument and take it apart manually.
- template <SCM (Super::*pmf)(void)>
+ template <SCM (Super::*pmf) (void)>
static SCM smob_trampoline (SCM self)
{
- return (Super::unchecked_unsmob (self)->*pmf)();
+ return (Super::unchecked_unsmob (self)->*pmf) ();
}
- template <SCM (Super::*pmf)(SCM)>
+ template <SCM (Super::*pmf) (SCM)>
static SCM smob_trampoline (SCM self, SCM arg1)
{
- return (Super::unchecked_unsmob (self)->*pmf)(arg1);
+ return (Super::unchecked_unsmob (self)->*pmf) (arg1);
}
- template <SCM (Super::*pmf)(SCM, SCM)>
+ template <SCM (Super::*pmf) (SCM, SCM)>
static SCM smob_trampoline (SCM self, SCM arg1, SCM arg2)
{
- return (Super::unchecked_unsmob (self)->*pmf)(arg1, arg2);
+ return (Super::unchecked_unsmob (self)->*pmf) (arg1, arg2);
}
- template <SCM (Super::*pmf)(SCM, SCM, SCM)>
+ template <SCM (Super::*pmf) (SCM, SCM, SCM)>
static SCM smob_trampoline (SCM self, SCM arg1, SCM arg2, SCM arg3)
{
- return (Super::unchecked_unsmob (self)->*pmf)(arg1, arg2, arg3);
+ return (Super::unchecked_unsmob (self)->*pmf) (arg1, arg2, arg3);
}
static bool is_smob (SCM s)
@@ -281,7 +281,8 @@ inline T *unsmob (SCM s)
// Simple smobs
template <class Super>
-class Simple_smob : public Smob_base<Super> {
+class Simple_smob : public Smob_base<Super>
+{
public:
static size_t free_smob (SCM obj)
{
@@ -290,7 +291,7 @@ public:
}
SCM smobbed_copy () const
{
- Super *p = new Super(*static_cast<const Super *> (this));
+ Super *p = new Super (*static_cast<const Super *> (this));
return Smob_base<Super>::register_ptr (p);
}
};
@@ -301,7 +302,8 @@ void unprotect_smob (SCM smob, SCM *prot_cons);
// The Smob_core class is not templated and contains material not
// depending on the Super class.
-class Smob_core {
+class Smob_core
+{
protected:
SCM self_scm_;
Smob_core () : self_scm_ (SCM_UNDEFINED) { };
@@ -311,11 +313,12 @@ public:
};
template <class Super>
-class Smob : public Smob_core, public Smob_base<Super> {
+class Smob : public Smob_core, public Smob_base<Super>
+{
private:
SCM protection_cons_;
Smob (const Smob<Super> &) = delete;
- Smob& operator= (const Smob<Super> &) = delete;
+ Smob &operator = (const Smob<Super> &) = delete;
protected:
Smob () : protection_cons_ (SCM_EOL) { };
public:
@@ -334,7 +337,8 @@ public:
{
protect_smob (self_scm_, &protection_cons_);
}
- void smobify_self () {
+ void smobify_self ()
+ {
protect_smob (unprotected_smobify_self (), &protection_cons_);
}
SCM unprotect ()
@@ -370,7 +374,7 @@ public:
// least some, so they are apparently not protected in spite of being
// included in the GC scans. So it would appear that scanning smobs
// is not equivalent to marking them. Ugh.
-#if defined(DEBUG) && !GUILEV2
+#if defined (DEBUG) && !GUILEV2
#define ASSERT_LIVE_IS_ALLOWED(arg) \
do { \
static parsed_dead pass_here; \
« no previous file with comments | « lily/include/small-smobs.hh ('k') | lily/include/source-file.hh » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b