Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Test Mac Clang
Browse files Browse the repository at this point in the history
mgreter committed May 1, 2016

Verified

This commit was signed with the committer’s verified signature.
bsmth Brian Smith
1 parent d918d31 commit b9e7d4d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/functions.cpp
Original file line number Diff line number Diff line change
@@ -258,7 +258,7 @@ namespace Sass {
> gen_std_dist(rand, std_dist);
#endif

tr1ns::uniform_real_distribution<> full_dist(0, ULONG_MAX);
tr1ns::uniform_real_distribution<> full_dist(0, 4294967296);
#ifdef IMPLEMENT_TR1
tr1ns::variate_generator <
tr1ns::mt19937,
@@ -1990,8 +1990,13 @@ namespace Sass {
BUILT_IN(unique_id)
{
std::stringstream ss;
std::uniform_real_distribution<> distributor(0, 4294967296); // 16^8
uint_fast32_t distributed = static_cast<uint_fast32_t>(distributor(rand));
// std::uniform_real_distribution<> distributor(0, 4294967296); // 16^8
// uint_fast32_t distributed = static_cast<uint_fast32_t>(distributor(rand));
#ifdef IMPLEMENT_TR1
uint_fast32_t distributed = gen_full_dist();
#else
uint_fast32_t distributed = full_dist(rand);
#endif
ss << "u" << std::setfill('0') << std::setw(8) << std::hex << distributed;
return SASS_MEMORY_NEW(ctx.mem, String_Quoted, pstate, ss.str());
}

0 comments on commit b9e7d4d

Please sign in to comment.