Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
Simplify and proper data types
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaLanfranchi authored and chfast committed Dec 14, 2018
1 parent 4ad2786 commit 6a5792b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libdevcore/CommonData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ double dev::getHashesToTarget(string _target)
return double(dividend / divisor);
}

std::string dev::getScaledSize(double _value, double _divisor, short _precision, string _sizes[],
std::string dev::getScaledSize(double _value, double _divisor, int _precision, string _sizes[],
size_t _numsizes, ScaleSuffix _suffix)
{
double _newvalue = _value;
Expand Down
6 changes: 3 additions & 3 deletions libdevcore/CommonData.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ std::string getTargetFromDiff(double diff, HexPrefix _prefix = HexPrefix::Add);
double getHashesToTarget(std::string _target);

/// Generic function to scale a value
std::string getScaledSize(double _value, double _divisor, short _precision, std::string _sizes[],
std::string getScaledSize(double _value, double _divisor, int _precision, std::string _sizes[],
size_t _numsizes, ScaleSuffix _suffix = ScaleSuffix::Add);

/// Formats hashrate
Expand All @@ -245,9 +245,9 @@ std::string getFormattedMemory(
double _mem, ScaleSuffix _suffix = ScaleSuffix::Add, int _precision = 2);

/// Adjust string to a fixed length filling chars to the Left
std::string padLeft(std::string const _value, size_t const _length, char const _fillChar);
std::string padLeft(std::string _value, size_t _length, char _fillChar);

/// Adjust string to a fixed length filling chars to the Right
std::string padRight(std::string const _value, size_t const _length, char const _fillChar);
std::string padRight(std::string _value, size_t _length, char _fillChar);

} // namespace dev

0 comments on commit 6a5792b

Please sign in to comment.