add a couple of asserts to note conditions that must hold true (and

currently do from reading the code) that confused coverity
c.f. CIDs 2215 and 2207

svn path=/branches/work/kde4/playground/graphics/okular/; revision=544514
remotes/origin/old/work/newpageview
Aaron J. Seigo 20 years ago
parent 924455d74c
commit 026a78b4e6
  1. 4
      ui/painter_agg2/agg_path_storage.h
  2. 3
      ui/painter_agg2/agg_rendering_buffer.h

@ -16,6 +16,8 @@
#ifndef AGG_PATH_STORAGE_INCLUDED
#define AGG_PATH_STORAGE_INCLUDED
#include <assert.h>
#include "agg_basics.h"
namespace agg
@ -316,6 +318,8 @@ namespace agg
{
allocate_block(nb);
}
assert(m_coord_blocks);
*xy_ptr = m_coord_blocks[nb] + ((m_total_vertices & block_mask) << 1);
return m_cmd_blocks[nb] + (m_total_vertices & block_mask);
}

@ -20,6 +20,8 @@
#ifndef AGG_RENDERING_BUFFER_INCLUDED
#define AGG_RENDERING_BUFFER_INCLUDED
#include <assert.h>
#include "agg_basics.h"
namespace agg
@ -90,6 +92,7 @@ namespace agg
T** rows = m_rows;
assert(height == 0 || m_rows);
while(height--)
{
*rows++ = row_ptr;

Loading…
Cancel
Save