mirror of https://github.com/CGAL/cgal
Fix msvc warning
This commit is contained in:
parent
945853fc34
commit
1fb65b6ea8
|
|
@ -238,7 +238,8 @@ private:
|
|||
typedef std::vector<int> index_vector;
|
||||
|
||||
//! map container element's type for maintaining a list of cache instances
|
||||
typedef std::pair<int, int> LRU_entry;
|
||||
typedef std::pair<int, std::size_t> LRU_entry;
|
||||
|
||||
//! LRU list used for cache switching
|
||||
typedef std::vector< LRU_entry > Cache_list;
|
||||
|
||||
|
|
@ -256,8 +257,9 @@ public:
|
|||
//!@{
|
||||
|
||||
//! default constructor: a curve segment is undefined
|
||||
Curve_renderer_2() : cache_id(-1), IA_method(0), initialized(false),
|
||||
one(1) {
|
||||
Curve_renderer_2() :
|
||||
cache_id(INVALID_CACHE_ID), IA_method(0), initialized(false), one(1)
|
||||
{
|
||||
arcno = -1;
|
||||
setup(Bbox_2(-1.0, -1.0, 1.0, 1.0), 640, 480);
|
||||
}
|
||||
|
|
@ -381,9 +383,11 @@ private:
|
|||
Clip_points btm_clip, top_clip; //! a set of bottom and top clip points
|
||||
Poly_dst_1 btm_poly, top_poly; //! bottom and top polynomials
|
||||
|
||||
int cache_id; //! index of currently used cache instance
|
||||
std::size_t cache_id; //! index of currently used cache instance
|
||||
Cache_list cache_list; //! list of indices of cache instances
|
||||
|
||||
static constexpr std::size_t INVALID_CACHE_ID = CGAL_N_CACHES;
|
||||
|
||||
Seed_stack s_stack; //! a stack of seed points
|
||||
Seed_point current_seed; //! current seed point
|
||||
|
||||
|
|
@ -1192,7 +1196,7 @@ Lexit:
|
|||
|
||||
std::reverse(rev_points.begin(), rev_points.end());
|
||||
// resize rev_points to accommodate the size of points vector
|
||||
unsigned rsize = rev_points.size();
|
||||
std::size_t rsize = rev_points.size();
|
||||
rev_points.resize(rsize + points.size());
|
||||
std::copy(points.begin(), points.end(), rev_points.begin() + rsize);
|
||||
}
|
||||
|
|
@ -2312,7 +2316,8 @@ void select_cache_entry(const Arc_2& arc) {
|
|||
it++;
|
||||
}
|
||||
|
||||
int new_id, new_entry = (it == cache_list.end());
|
||||
std::size_t new_id;
|
||||
bool new_entry = (it == cache_list.end());
|
||||
if(new_entry) {
|
||||
new_id = cache_list.size();
|
||||
if(new_id >= CGAL_N_CACHES) {
|
||||
|
|
|
|||
|
|
@ -1028,7 +1028,7 @@ void precompute(const Polynomial_2& in) {
|
|||
}
|
||||
|
||||
//! \brief activates the cache entry \c cache_id
|
||||
void select_cache_entry(int cache_id)
|
||||
void select_cache_entry(std::size_t cache_id)
|
||||
{
|
||||
coeffs_x = coeffs_x_ + cache_id;
|
||||
coeffs_y = coeffs_y_ + cache_id;
|
||||
|
|
|
|||
Loading…
Reference in New Issue