misc: Fix coding style for enum's opening braces

The systemc dir was not included in this fix.

First it was identified that there were only occurrences
at 0, 1, and 2 levels of indentation (and 2 of 2 spaces,
1 of 3 spaces and 2 of 12 spaces), using:

    grep -nrE --exclude-dir=systemc \
        "^ *enum [A-Za-z].* {$" src/

Then the following commands were run to replace:

    <indent level>enum X ... {

by:

    <indent level>enum X ...
    <indent level>{

Level 0:
    grep -nrl --exclude-dir=systemc \
        "^enum [A-Za-z].* {$" src/ | \
        xargs sed -Ei \
        's/^enum ([A-Za-z].*) \{$/enum \1\n\{/g'

Level 1:
    grep -nrl --exclude-dir=systemc \
        "^    enum [A-Za-z].* {$" src/ | \
        xargs sed -Ei \
        's/^    enum ([A-Za-z].*) \{$/    enum \1\n    \{/g'

and so on.

Change-Id: Ib186cf379049098ceaec20dfe4d1edcedd5f940d
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43326
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Daniel R. Carvalho
2021-03-19 19:05:04 -03:00
committed by Daniel Carvalho
parent 08913caec2
commit 7f1de4e686
104 changed files with 370 additions and 187 deletions

View File

@@ -54,7 +54,8 @@ swap_byte(AuxVector<IntType> av)
return av;
}
enum AuxiliaryVectorType {
enum AuxiliaryVectorType
{
M5_AT_NULL = 0, // End of vector.
M5_AT_IGNORE = 1, // Ignored.
M5_AT_EXECFD = 2, // File descriptor of program if interpreter used.

View File

@@ -68,7 +68,8 @@ class Drainable;
*
* @ingroup api_drain
*/
enum class DrainState {
enum class DrainState
{
Running, /**< Running normally */
Draining, /**< Draining buffers pending serialization/handover */
Drained, /**< Buffers drained, ready for serialization/handover */

View File

@@ -148,7 +148,8 @@ class FileFDEntry: public HBFDEntry
class PipeFDEntry: public HBFDEntry
{
public:
enum EndType {
enum EndType
{
read = 0,
write = 1
};

View File

@@ -114,7 +114,8 @@ class InstRecord
/** @ingroup data
* What size of data was written?
*/
enum DataStatus {
enum DataStatus
{
DataInvalid = 0,
DataInt8 = 1, // set to equal number of bytes
DataInt16 = 2,

View File

@@ -85,7 +85,8 @@ class MathExpr
}
private:
enum Operator {
enum Operator
{
bAdd, bSub, bMul, bDiv, bPow, uNeg, sValue, sVariable, nInvalid
};