Skip to content

Commit

Permalink
[devil] Patch out deprecated use of 'register' in cpp17 (microsoft#36665
Browse files Browse the repository at this point in the history
)
  • Loading branch information
FrankXie05 authored Mar 14, 2024
1 parent 4d61c5b commit 7f9f0e4
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
30 changes: 30 additions & 0 deletions ports/devil/0007-remove_register_keyword_cpp17.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
diff --git a/DevIL/src-IL/src/il_manip.cpp b/DevIL/src-IL/src/il_manip.cpp
index 79acc99..229a692 100644
--- a/DevIL/src-IL/src/il_manip.cpp
+++ b/DevIL/src-IL/src/il_manip.cpp
@@ -37,9 +37,9 @@ ILushort ILAPIENTRY ilFloatToHalf(ILuint i) {
// of float and half (127 versus 15).
//

- register int s = (i >> 16) & 0x00008000;
- register int e = ((i >> 23) & 0x000000ff) - (127 - 15);
- register int m = i & 0x007fffff;
+ int s = (i >> 16) & 0x00008000;
+ int e = ((i >> 23) & 0x000000ff) - (127 - 15);
+ int m = i & 0x007fffff;

//
// Now reassemble s, e and m into a half:
diff --git a/DevIL/src-ILU/src/ilu_scaling.cpp b/DevIL/src-ILU/src/ilu_scaling.cpp
index c2893a3..ef35c13 100644
--- a/DevIL/src-ILU/src/ilu_scaling.cpp
+++ b/DevIL/src-ILU/src/ilu_scaling.cpp
@@ -406,7 +406,7 @@ main(argc, argv)
int argc;
char *argv[];
{
- register int c;
+ int c;
int optind;
char *optarg;
int xsize = 0, ysize = 0;
1 change: 1 addition & 0 deletions ports/devil/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vcpkg_from_github(
0005-fix-pkgconfig.patch
0006-fix-ilut-header.patch
jasper-4.patch
0007-remove_register_keyword_cpp17.patch
)

file(REMOVE "${SOURCE_PATH}/DevIL/src-IL/cmake/FindOpenEXR.cmake")
Expand Down
2 changes: 1 addition & 1 deletion ports/devil/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "devil",
"version": "1.8.0",
"port-version": 11,
"port-version": 12,
"description": "A full featured cross-platform image library",
"homepage": "https://github.com/DentonW/DevIL",
"supports": "!uwp",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2198,7 +2198,7 @@
},
"devil": {
"baseline": "1.8.0",
"port-version": 11
"port-version": 12
},
"dimcli": {
"baseline": "7.2.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/d-/devil.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1e22a47b75583772a690e6e361fcbb3739838282",
"version": "1.8.0",
"port-version": 12
},
{
"git-tree": "03010167ad1849c5f1a8e5bc044115b3c84478a3",
"version": "1.8.0",
Expand Down

0 comments on commit 7f9f0e4

Please sign in to comment.