Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C compatible enum.h and struct.h #479

Merged
merged 2 commits into from
Nov 26, 2018
Merged

C compatible enum.h and struct.h #479

merged 2 commits into from
Nov 26, 2018

Conversation

AJenbo
Copy link
Member

@AJenbo AJenbo commented Nov 26, 2018

This PR simply changes the code style in struct.h and enum.h to one that allows us to use the header in the same way for both C and C++.

@AJenbo AJenbo mentioned this pull request Nov 26, 2018
@mewmew
Copy link
Contributor

mewmew commented Nov 26, 2018

From https://ci.appveyor.com/project/galaxyhaxz/devilution/builds/20552451

c:\projects\devilution\source\monster.cpp(1613): error C2065: 'MFLAG_NO_ENEMY': undeclared identifier [C:\projects\devilution\Diablo.vcxproj]
c:\projects\devilution\source\monster.cpp(1615): error C2065: 'MFLAG_NO_ENEMY': undeclared identifier [C:\projects\devilution\Diablo.vcxproj]
c:\projects\devilution\source\monster.cpp(4975): error C2065: 'MFLAG_NO_ENEMY': undeclared identifier 

From https://travis-ci.org/diasurgical/devilution/jobs/459700345

Source/monster.cpp(1613) : error C2065: 'MFLAG_NO_ENEMY' : undeclared identifier

enums.h Outdated
@@ -1446,22 +1446,22 @@ enum monster_flag {
MFLAG_KNOCKBACK = 0x80,
MFLAG_SEARCH = 0x100,
MFLAG_CAN_OPEN_DOOR = 0x200,
MFLAG_NO_ENEMY = 0x400,
MFLAG_SEARCH2 = 0x400,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MFLAG_SEARCH2 = 0x400,
MFLAG_NO_ENEMY = 0x400,

@mewmew
Copy link
Contributor

mewmew commented Nov 26, 2018

LGTM when the build passes :)

Copy link
Contributor

@mewmew mewmew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@AJenbo
Copy link
Member Author

AJenbo commented Nov 26, 2018

Thanks for the review :)

@AJenbo AJenbo merged commit 9edeecb into diasurgical:nightly Nov 26, 2018
@AJenbo AJenbo deleted the enum-struct-c branch November 26, 2018 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants