From 2a661e38d0f93d146914bb581d6fba8c3adbb44d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Sat, 16 Jul 2005 09:40:16 +0000 Subject: [PATCH] remove assert git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10235 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 9 ++++++++- src/paragraph.h | 9 +-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index aa6f7ff968..d34ed386b5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ + +2005-07-16 André Pönitz + + * paragraph.h (getChar): remove asserts as the same kind of security + can be achieved by using a suitable standard library implementation + and the function was in the critical path (25.9% in profiler) + 2005-07-16 Juergen Vigna * cursor.C (bruteFind2): @@ -17,7 +24,7 @@ * lyxfunc.C (dispatch): save and restore the cursor after a textclass switch. -2005-07-15 +2005-07-15 Lars Gullik Bjønnes * text.C (backspace): bug 806 for empty keepempty paragraphs we change the layout to default before letting DEPM do its thing. diff --git a/src/paragraph.h b/src/paragraph.h index 14c9cc156e..b16ac0d5b0 100644 --- a/src/paragraph.h +++ b/src/paragraph.h @@ -26,8 +26,6 @@ #include "support/types.h" -#include - #include #include @@ -288,12 +286,7 @@ public: std::pair getFontSpan(lyx::pos_type pos) const; /// /// this is a bottleneck. - value_type getChar(lyx::pos_type pos) const - { - BOOST_ASSERT(pos >= 0); - BOOST_ASSERT(pos < int(text_.size())); - return text_[pos]; - } + value_type getChar(lyx::pos_type pos) const { return text_[pos]; } /// Get the char, but mirror all bracket characters if it is right-to-left value_type getUChar(BufferParams const &, lyx::pos_type pos) const; /// The position must already exist. -- 2.39.2