Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

template workaround #224

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions libethcore/ICAP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,19 @@ std::string ICAP::encoded() const
{
if (m_type == Direct)
{
#ifdef __INTEL_COMPILER
// TODO: Resolve template functions cleanly with intel platform
static char const* c_alphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
typename FixedHash<Address::size>::Arith a = m_direct;
std::string d;
for (; a > 0; a /= 36)
{
unsigned r = (a - a / 36 * 36).convert_to<unsigned>(); // boost's % is broken
d = c_alphabet[r] + d;
}
#else
std::string d = toBase36<Address::size>(m_direct);
#endif
while (d.size() < 30) // always 34, sometimes 35.
d = "0" + d;
return iban("XE", d);
Expand Down