uri: silence some narrowing conversion warnings
This commit is contained in:
parent
1828687a7e
commit
52e9309949
3
uri.cpp
3
uri.cpp
@ -1,5 +1,6 @@
|
||||
#include "./uri.hpp"
|
||||
|
||||
#include "./cast.hpp"
|
||||
#include "./string.hpp"
|
||||
|
||||
#include "./debug/panic.hpp"
|
||||
@ -183,7 +184,7 @@ uri::set (component c, std::string_view val)
|
||||
val
|
||||
);
|
||||
|
||||
m_offsets[c].second = m_offsets[c].first + val.size ();
|
||||
m_offsets[c].second = cruft::cast::lossless<int> (m_offsets[c].first + val.size ());
|
||||
|
||||
for (int i = c + 1; i != component::NUM_COMPONENTS; ++i) {
|
||||
m_offsets[i].first += diff;
|
||||
|
@ -91,8 +91,8 @@ cruft::uri::parse (void)
|
||||
|
||||
CHECK (starts[idx]);
|
||||
|
||||
m_offsets[idx].first = starts[idx] - str;
|
||||
m_offsets[idx].second = p - str;
|
||||
m_offsets[idx].first = cruft::cast::narrow<int> (starts[idx] - str);
|
||||
m_offsets[idx].second = cruft::cast::narrow<int> ( p - str);
|
||||
};
|
||||
|
||||
bool __success = false;
|
||||
|
Loading…
Reference in New Issue
Block a user