Browse Source

make enum and parameter used in Bind() unsigned

- it's good practise to use unsigned int for enum flags, so change this
  one, as I introduced this for Bind()
0.8
Philip Kaufmann 12 years ago
parent
commit
29e214aaf5
  1. 6
      src/init.cpp

6
src/init.cpp

@ -29,8 +29,8 @@ CClientUIInterface uiInterface;
// Used to pass flags to the Bind() function // Used to pass flags to the Bind() function
enum BindFlags { enum BindFlags {
BF_NONE = 0, BF_NONE = 0,
BF_EXPLICIT = 1, BF_EXPLICIT = (1U << 0),
BF_REPORT_ERROR = 2 BF_REPORT_ERROR = (1U << 1)
}; };
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -220,7 +220,7 @@ bool static InitWarning(const std::string &str)
} }
bool static Bind(const CService &addr, int flags) { bool static Bind(const CService &addr, unsigned int flags) {
if (!(flags & BF_EXPLICIT) && IsLimited(addr)) if (!(flags & BF_EXPLICIT) && IsLimited(addr))
return false; return false;
std::string strError; std::string strError;

Loading…
Cancel
Save