Skip to content

Commit 330c5f9

Browse files
UdjinM6ogabrielides
authored andcommitted
fix: should avoid implicit conversions in pushKV params (dashpay#5719)
## Issue being fixed or feature implemented Should fix compilation errors like ``` masternode/meta.cpp:43:9: error: call to member function 'pushKV' is ambiguous ret.pushKV("lastOutboundAttemptElapsed", now - lastOutboundAttempt); ^~ masternode/meta.cpp:45:9: error: call to member function 'pushKV' is ambiguous ret.pushKV("lastOutboundSuccessElapsed", now - lastOutboundSuccess); ^~ ``` on FreeBSD + clang-15 kudos to @MrDefacto for finding the issue and testing the fix ## What was done? Specify `now` variable type explicitly instead of relying on `auto` ## How Has This Been Tested? MrDefacto confirmed it compiles with no issues on FreeBSD now ## Breaking Changes n/a ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
1 parent 7c966c9 commit 330c5f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/masternode/meta.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ UniValue CMasternodeMetaInfo::ToJson() const
3434
{
3535
UniValue ret(UniValue::VOBJ);
3636

37-
auto now = GetTime<std::chrono::seconds>().count();
37+
int64_t now = GetTime<std::chrono::seconds>().count();
3838

3939
ret.pushKV("lastDSQ", nLastDsq);
4040
ret.pushKV("mixingTxCount", nMixingTxCount);

0 commit comments

Comments
 (0)