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

@@ -41,7 +41,8 @@
namespace Loader
{
enum Arch {
enum Arch
{
UnknownArch,
SPARC64,
SPARC32,
@@ -58,7 +59,8 @@ enum Arch {
const char *archToString(Arch arch);
enum OpSys {
enum OpSys
{
UnknownOpSys,
Tru64,
Linux,

View File

@@ -44,7 +44,8 @@ namespace Loader
struct Symbol
{
enum class Binding {
enum class Binding
{
Global,
Local,
Weak

View File

@@ -61,7 +61,8 @@ class Logger
static Logger &getInfo();
static Logger &getHack();
enum LogLevel {
enum LogLevel
{
PANIC, FATAL, WARN, INFO, HACK,
NUM_LOG_LEVELS,
};

View File

@@ -283,7 +283,8 @@ hex2i(const char **srcp)
return r;
}
enum GdbBreakpointType {
enum GdbBreakpointType
{
GdbSoftBp = '0',
GdbHardBp = '1',
GdbWriteWp = '2',

View File

@@ -87,7 +87,8 @@ class VncInput : public SimObject
public:
/** Client -> Server message IDs */
enum ClientMessages {
enum ClientMessages
{
ClientSetPixelFormat = 0,
ClientSetEncodings = 2,
ClientFrameBufferUpdate = 3,

View File

@@ -71,7 +71,8 @@ class VncServer : public VncInput
const static uint32_t VncOK = 0;
/** Server -> Client message IDs */
enum ServerMessages {
enum ServerMessages
{
ServerFrameBufferUpdate = 0,
ServerSetColorMapEntries = 1,
ServerBell = 2,
@@ -79,7 +80,8 @@ class VncServer : public VncInput
};
/** Encoding types */
enum EncodingTypes {
enum EncodingTypes
{
EncodingRaw = 0,
EncodingCopyRect = 1,
EncodingHextile = 5,
@@ -87,7 +89,8 @@ class VncServer : public VncInput
};
/** keyboard/mouse support */
enum MouseEvents {
enum MouseEvents
{
MouseLeftButton = 0x1,
MouseRightButton = 0x2,
MouseMiddleButton = 0x4
@@ -98,7 +101,8 @@ class VncServer : public VncInput
return "RFB 003.008\n";
}
enum ConnectionState {
enum ConnectionState
{
WaitForProtocolVersion,
WaitForSecurityResponse,
WaitForClientInit,