make the bounds check in BreakpointHandler::at() an assert

This commit is contained in:
Oswald Buddenhagen
2009-06-17 17:31:52 +02:00
parent d131e2014c
commit 34197e361b
2 changed files with 3 additions and 3 deletions

View File

@@ -30,6 +30,8 @@
#ifndef DEBUGGER_BREAKHANDLER_H
#define DEBUGGER_BREAKHANDLER_H
#include <utils/qtcassert.h>
#include <QtCore/QObject>
#include <QtCore/QAbstractItemModel>
@@ -121,7 +123,7 @@ public:
QAbstractItemModel *model() { return this; }
BreakpointData *at(int index) const { return index < size() ? m_bp.at(index) : 0; }
BreakpointData *at(int index) const { QTC_ASSERT(index < size(), return 0); return m_bp.at(index); }
int size() const { return m_bp.size(); }
bool hasPendingBreakpoints() const;
void append(BreakpointData *data);