GetDunne Wiki

Notes from the desk of Shane Dunne, software development consultant

User Tools

Site Tools


modernizing_the_vanillajuce_code_base

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
modernizing_the_vanillajuce_code_base [2017/08/31 20:56]
shane
modernizing_the_vanillajuce_code_base [2017/09/01 19:35]
shane [Coding Practices]
Line 1: Line 1:
-==== Coding Practices ==== 
-  * [[Modernizing the VanillaJuce code base]] -- purging outdated practices in C++ code 
  
 ====== Modernizing the VanillaJuce code base ====== ====== Modernizing the VanillaJuce code base ======
Line 28: Line 26:
  
 It occurred to me that Jules's "quick code review" could form the basis of a nice little article, so instead of simply working through the list and updating the code, I've decided to document the process here, for the benefit of other programmers who, like me, may not be familiar with the latest C++ features and practices. It occurred to me that Jules's "quick code review" could form the basis of a nice little article, so instead of simply working through the list and updating the code, I've decided to document the process here, for the benefit of other programmers who, like me, may not be familiar with the latest C++ features and practices.
 +
 +I'll start by reorganizing Jules's list into categories, and write something about each.
 +
 +===== Outdated C syntax and library functions =====
 +  * [[enum_class_rather_than_typedef_enum|C++11 "enum class" rather than C "typedef enum"]]
 +  * [[eliminate_char_arrays|C++ string classes instead of char[] arrays]]
 +  * [[constexpr instead of preprocessor define]]
 +
 +===== Pointers and references =====
 +  * [[Avoid new/delete, prefer references to pointers, use member variables for sub-Components]]
 +
 +===== Newer C++ features and constructs =====
 +  * [[Range-based for loops]]
 +  * [[inline member variable initialization]]
  
  
modernizing_the_vanillajuce_code_base.txt ยท Last modified: 2017/09/01 19:49 by shane