mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-29 08:36:45 +01:00
Resolved 64-bit specific warnings.
This commit is contained in:
parent
d656edc28b
commit
5885afe6b2
11 changed files with 16 additions and 16 deletions
|
@ -202,7 +202,7 @@ public:
|
|||
virtual double doEvaluate(const DOM::Node<string_type, string_adaptor>& context,
|
||||
const ExecutionContext<string_type, string_adaptor>& executionContext) const
|
||||
{
|
||||
return baseT::argAsNodeSet(0, context, executionContext).size();
|
||||
return static_cast<double>(baseT::argAsNodeSet(0, context, executionContext).size());
|
||||
} // evaluate
|
||||
}; // class CountFn
|
||||
|
||||
|
@ -480,7 +480,7 @@ protected:
|
|||
if(startAt < 0)
|
||||
startAt = 0;
|
||||
if((isInfinite(endAt)) || (endAt > string_adaptor::length(value)))
|
||||
endAt = string_adaptor::length(value);
|
||||
endAt = static_cast<double>(string_adaptor::length(value));
|
||||
|
||||
return string_adaptor::substr(value, static_cast<int>(startAt), static_cast<int>(endAt - startAt));
|
||||
} // evaluate
|
||||
|
@ -498,7 +498,7 @@ public:
|
|||
const ExecutionContext<string_type, string_adaptor>& executionContext) const
|
||||
{
|
||||
string_type v = (baseT::argCount() > 0) ? baseT::argAsString(0, context, executionContext) : nodeStringValue<string_type, string_adaptor>(context);
|
||||
return string_adaptor::length(v);
|
||||
return static_cast<double>(string_adaptor::length(v));
|
||||
} // evaluate
|
||||
}; // StringLengthFn
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ basic_socketbuf<charT, traitsT>* basic_socketbuf<charT, traitsT>::open(const cha
|
|||
sockAddr.sin_port = htons(port);
|
||||
|
||||
// connect
|
||||
int tmpsock = socket(AF_INET, SOCK_STREAM, 0);
|
||||
int tmpsock = static_cast<int>(socket(AF_INET, SOCK_STREAM, 0));
|
||||
if(tmpsock == INVALID_SOCKET)
|
||||
return 0;
|
||||
if(connect(tmpsock, reinterpret_cast<sockaddr*>(&sockAddr), sizeof(sockaddr_in)) != 0)
|
||||
|
@ -267,7 +267,7 @@ bool basic_socketbuf<charT, traitsT>::writeSocket()
|
|||
if(!length)
|
||||
return true;
|
||||
|
||||
bool ok = (send(sock_, from_next, length, 0) != SOCKET_ERROR);
|
||||
bool ok = (send(sock_, from_next, static_cast<int>(length), 0) != SOCKET_ERROR);
|
||||
|
||||
if(ok)
|
||||
setp(from_next, from_next + outBuffer_.capacity());
|
||||
|
@ -289,13 +289,13 @@ int basic_socketbuf<charT, traitsT>::readSocket()
|
|||
if(!inBuffer_.capacity())
|
||||
growInBuffer();
|
||||
|
||||
size_t pbCount = std::min<int>(gptr() - eback(), pbSize_);
|
||||
size_t pbCount = std::min<size_t>(gptr() - eback(), pbSize_);
|
||||
|
||||
memcpy(&(inBuffer_[0]) + (pbSize_-pbCount)*sizeof(charT),
|
||||
gptr() - pbCount*sizeof(charT),
|
||||
pbCount*sizeof(charT));
|
||||
|
||||
int res = recv(sock_, &(inBuffer_[0]) + pbSize_, inBuffer_.capacity() - pbSize_, 0);
|
||||
int res = recv(sock_, &(inBuffer_[0]) + pbSize_, static_cast<int>(inBuffer_.capacity() - pbSize_), 0);
|
||||
if(res == 0)
|
||||
{
|
||||
// server closed the socket
|
||||
|
|
|
@ -150,7 +150,7 @@ int base64codecvt::do_length(const std::mbstate_t&,
|
|||
chars -= 3;
|
||||
} // while(chars > max)
|
||||
|
||||
return length;
|
||||
return static_cast<int>(length);
|
||||
} // do_length
|
||||
|
||||
int base64codecvt::do_max_length() const throw()
|
||||
|
|
|
@ -55,7 +55,7 @@ int iso88591utf8codecvt::do_length(const std::mbstate_t&,
|
|||
++from_next;
|
||||
} // while
|
||||
|
||||
return (from_next-from);
|
||||
return static_cast<int>(from_next-from);
|
||||
} // do_length
|
||||
|
||||
// end of file
|
||||
|
|
|
@ -43,7 +43,7 @@ int rot13codecvt::do_length(const std::mbstate_t&,
|
|||
const char* end,
|
||||
size_t max) const
|
||||
{
|
||||
return std::max<int>(end - from, max);
|
||||
return std::max<int>(static_cast<int>(end - from), static_cast<int>(max));
|
||||
} // do_length
|
||||
|
||||
// end of file
|
||||
|
|
|
@ -58,7 +58,7 @@ int ucs2utf8codecvt::do_length(const std::mbstate_t&,
|
|||
++from_next;
|
||||
} // while
|
||||
|
||||
return (from_next-from);
|
||||
return static_cast<int>(from_next-from);
|
||||
} // do_length
|
||||
|
||||
// end of file
|
||||
|
|
|
@ -47,7 +47,7 @@ int utf16beucs2codecvt::do_length(const std::mbstate_t&,
|
|||
const char* end,
|
||||
size_t max) const
|
||||
{
|
||||
return std::max<int>((end-from), max/2);
|
||||
return std::max<int>(static_cast<int>(end-from), static_cast<int>(max/2));
|
||||
} // do_length
|
||||
|
||||
#endif
|
||||
|
|
|
@ -47,7 +47,7 @@ int utf16leucs2codecvt::do_length(const std::mbstate_t&,
|
|||
const char* end,
|
||||
size_t max) const
|
||||
{
|
||||
return std::max<int>((end-from), max/2);
|
||||
return std::max<int>(static_cast<int>(end-from), static_cast<int>(max/2));
|
||||
} // do_length
|
||||
|
||||
#endif
|
||||
|
|
|
@ -58,7 +58,7 @@ int utf16utf8codecvt::do_length(const std::mbstate_t&,
|
|||
++from_next;
|
||||
} // while
|
||||
|
||||
return (from_next-from);
|
||||
return static_cast<int>(from_next-from);
|
||||
} // do_length
|
||||
|
||||
// end of file
|
||||
|
|
|
@ -76,7 +76,7 @@ int utf8iso88591codecvt::do_length(const std::mbstate_t&,
|
|||
}
|
||||
} // while
|
||||
|
||||
return (from_next-from);
|
||||
return static_cast<int>(from_next-from);
|
||||
} // do_length
|
||||
|
||||
// end of file
|
||||
|
|
|
@ -77,7 +77,7 @@ int utf8ucs2codecvt::do_length(const std::mbstate_t&,
|
|||
}
|
||||
} // while
|
||||
|
||||
return (from_next-from);
|
||||
return static_cast<int>(from_next-from);
|
||||
} // do_length
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue