Skip to content

Adjust the spacing for consistency #1626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from May 28, 2020
Merged

Adjust the spacing for consistency #1626

merged 2 commits into from May 28, 2020

Conversation

ghost
Copy link

@ghost ghost commented May 24, 2020

There are some inconsistency in spacing and I corrected them

corrections

  1. templates
    template <class T>template<class T>

  2. classes

    class Aclass A {
    {           };
    };
  3. functions

    void foo {  ➝  void foo
    }              {
                   }
  4. lambda expressions
    [](buffer& b){ ➝ [](buffer& b) {


references

I applied spacing to the following priorities
However, there were cases in which several forms were used in a single document
In such cases, more frequently used forms were applied

  1. TC++PL
  2. NL: Naming and layout
  3. the standard
  4. other guidelines such as google c++ style guide

@cubbimew
Copy link
Member

seeing as NL.17 recommends "Stroustrup style" as the default, I would say TC++PL would be the golden source here

@ghost
Copy link
Author

ghost commented May 25, 2020

I could find there is no space between class's constructors and its initializer lists in TC++PL
and so I will make an additional patche for this

For example the space between : and var_ should be removed

as is

class A {
public:
  A(int var) : var_(var)
  {
  }
private:
  int var_;
};

to be

class A {
public:
  A(int var) :var_(var)
  {
  }
private:
  int var_;
};

@hsutter
Copy link
Contributor

hsutter commented May 28, 2020

Editors call: Thanks!

@hsutter hsutter merged commit 19f2672 into isocpp:master May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants