mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
add some assertion for C-style table access.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21379 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b931f6ab4a
commit
876d88a86e
@ -22,6 +22,7 @@
|
||||
|
||||
#include <QFont>
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
namespace lyx {
|
||||
@ -67,6 +68,10 @@ public:
|
||||
|
||||
/// Get font info (font + metrics) for the given LyX font.
|
||||
GuiFontInfo & fontinfo(FontInfo const & f) {
|
||||
BOOST_ASSERT(f.family() < NUM_FAMILIES);
|
||||
BOOST_ASSERT(f.series() < 2);
|
||||
BOOST_ASSERT(f.realShape() < 4);
|
||||
BOOST_ASSERT(f.size() < 10);
|
||||
// fi is a reference to the pointer type (GuiFontInfo *) in the
|
||||
// fontinfo_ table.
|
||||
GuiFontInfo * & fi =
|
||||
|
Loading…
Reference in New Issue
Block a user