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

[TRIVIAL] Fix build error: uint is not universally defined #4731

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

ximinez
Copy link
Collaborator

@ximinez ximinez commented Sep 27, 2023

High Level Overview of Change

Fixes the Windows build

Context of Change

Introduced by #4618

Type of Change

  • [X ] Bug fix (non-breaking change which fixes an issue)

@ckeshava
Copy link
Collaborator

Is there a reason why uint isn't defined for windows platform? I feel this would increase the compatibility between linux, mac and windows, from a developer experience perspective.

@ximinez
Copy link
Collaborator Author

ximinez commented Sep 27, 2023

Is there a reason why uint isn't defined for windows platform? I feel this would increase the compatibility between linux, mac and windows, from a developer experience perspective.

I really have no idea. I am pretty sure that it's not defined in the standard as a separate type (https://en.cppreference.com/w/cpp/types/integer). My best guess is that it's either a compiler extension, or some slight difference in the dependency/header tree from one of the included libraries. We shouldn't rely on either when unsigned int is part of the standard and works perfectly well here.

Also notice that I only changed the .h file. It's already defined as unsigned int in the .cpp file.

@intelliot
Copy link
Collaborator

note: confirmed with ximinez this is ready to merge

@intelliot intelliot merged commit b92d511 into XRPLF:develop Sep 27, 2023
15 checks passed
@ximinez ximinez deleted the uint-fix branch September 27, 2023 21:35
sophiax851 pushed a commit to sophiax851/rippled that referenced this pull request Jun 12, 2024
Fix the Windows build by using `unsigned int` (instead of `uint`).

The error, introduced by XRPLF#4618, looks something like:
  rpc\impl\RPCHelpers.h(299,5): error C2061: syntax error: identifier
  'uint' (compiling source file app\ledger\Ledger.cpp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants