Project

General

Profile

Actions

Task #1823

closed

Update code to follow ndn-cxx code style

Added by Alex Afanasyev over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
08/05/2014
Due date:
% Done:

100%

Estimated time:

Description

The code should be updated to more closely follow ndn-cxx code style:

  • limit lines <= 100 columns
  • ! private member variables MUST have m_ prefix
  • avoid tabs
  • avoid C comments (except doxygen blocks).
  • correct spaces around "<<" (should be), ++ (should not be)
  • avoid trailing whitespace and dangling newline at the end of the file
  • (not really ndn-cxx, but we should do it)
  • new line before else and else if (should be)
  • methods declaration and definition should be (name and return type always separated)

    const Response& 
    getResponse() const;
    

    and

    const Response& 
    getResponse() const
    {
    }
    
  • there should not be space between type and & and * and there should be space before variable. Like Name& name or const char* string

  • ifndef guards should have correct names that follow file path and name. For example, for name-dig.hpp in src/app, the guard name should be NDNS_APP_NAME_DIG_HPP

  • add new line between license boilerplate and guard or first include

  • indentation should be corrected. There are several places where it is used inconsistently

Other related things:

  • use correct license boilerplate in files
  • remove automatically generated comments (e.g., "TODO Auto-generated destructor stub")
  • const& should be used for passing complex types, such as std::string:
Actions #1

Updated by Alex Afanasyev over 9 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF