Skip to content

Commit

Permalink
Revert more enum changes which were not required
Browse files Browse the repository at this point in the history
  • Loading branch information
mutagene committed Nov 19, 2023
1 parent 988e931 commit 76ef1b2
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include <functional>

enum class EnumData : int {
A = 0,
B = 1,
A,
B,
};

namespace std {
Expand Down
4 changes: 2 additions & 2 deletions src/it/resources/expected/all_datatypes/cppcli/EnumData.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
#include "../cpp-headers/enum_data.hpp"

public enum class EnumData {
A = 0,
B = 1,
A,
B,
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

typedef NS_ENUM(NSInteger, ITEnumData)
{
ITEnumDataA = 0,
ITEnumDataB = 1,
ITEnumDataA,
ITEnumDataB,
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include <functional>

enum class EnumData : int {
FIRSTENUMVALUE = 0,
SECONDENUMVALUE = 1,
FIRSTENUMVALUE,
SECONDENUMVALUE,
};

namespace std {
Expand Down
4 changes: 2 additions & 2 deletions src/it/resources/expected/deprecation/cpp-headers/my_enum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
*/
enum class [[deprecated("Use something else")]] MyEnum : int {
/** @deprecated Use something else */
OPTION1 = 0,
OPTION1,
/** not deprecated */
OPTION2 = 1,
OPTION2,
};

namespace std {
Expand Down
4 changes: 2 additions & 2 deletions src/it/resources/expected/deprecation/objc-headers/ITMyEnum.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
typedef NS_ENUM(NSInteger, ITMyEnum)
{
/** @deprecated Use something else */
ITMyEnumOption1 = 0,
ITMyEnumOption1,
/** not deprecated */
ITMyEnumOption2 = 1,
ITMyEnumOption2,
};
4 changes: 2 additions & 2 deletions src/it/resources/expected/deprecation/ts/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
*/
export enum MyEnum {
/** @deprecated Use something else */
OPTION1 = 0,
OPTION1,
/** not deprecated */
OPTION2 = 1,
OPTION2,
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/it/resources/expected/my_enum/cpp-headers/my_enum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
/** enum comment */
enum class MyEnum : int {
/** enum option comment */
OPTION1 = 0,
OPTION2 = 1,
OPTION3 = 2,
OPTION1,
OPTION2,
OPTION3,
};

namespace std {
Expand Down
6 changes: 3 additions & 3 deletions src/it/resources/expected/my_enum/cppcli/MyEnum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/** enum comment */
public enum class MyEnum {
/** enum option comment */
Option1 = 0,
Option2 = 1,
Option3 = 2,
Option1,
Option2,
Option3,
};
6 changes: 3 additions & 3 deletions src/it/resources/expected/my_enum/objc-headers/ITMyEnum.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
typedef NS_ENUM(NSInteger, ITMyEnum)
{
/** enum option comment */
ITMyEnumOption1 = 0,
ITMyEnumOption2 = 1,
ITMyEnumOption3 = 2,
ITMyEnumOption1,
ITMyEnumOption2,
ITMyEnumOption3,
};
4 changes: 3 additions & 1 deletion src/main/scala/djinni/generator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,9 @@ abstract class Generator(spec: Spec) {
writeDoc(w, o.doc)
w.wl(
ident(o.ident.name) + (if (e.flags) s" $delim 1$optionSuffix << $shift"
else s" $delim $shift") + ","
else if (delim != "=") s" $delim $shift"
else "")
+ ","
)
shift += 1
}
Expand Down

0 comments on commit 76ef1b2

Please sign in to comment.