forked from qt-creator/qt-creator
Debugger: Drop Location::init()
We can do better with C++11. Change-Id: Ie9e9cd4dfbbfc4ba29c0aa6bbfdf33ae7ac184fe Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -118,7 +118,6 @@ namespace Internal {
|
|||||||
|
|
||||||
Location::Location(const StackFrame &frame, bool marker)
|
Location::Location(const StackFrame &frame, bool marker)
|
||||||
{
|
{
|
||||||
init();
|
|
||||||
m_fileName = frame.file;
|
m_fileName = frame.file;
|
||||||
m_lineNumber = frame.line;
|
m_lineNumber = frame.line;
|
||||||
m_needsMarker = marker;
|
m_needsMarker = marker;
|
||||||
|
|||||||
@@ -140,11 +140,11 @@ public:
|
|||||||
class Location
|
class Location
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Location() { init(); }
|
Location() {}
|
||||||
Location(quint64 address) { init(); m_address = address; }
|
Location(quint64 address) { m_address = address; }
|
||||||
Location(const QString &file) { init(); m_fileName = file; }
|
Location(const QString &file) { m_fileName = file; }
|
||||||
Location(const QString &file, int line, bool marker = true)
|
Location(const QString &file, int line, bool marker = true)
|
||||||
{ init(); m_lineNumber = line; m_fileName = file; m_needsMarker = marker; }
|
{ m_lineNumber = line; m_fileName = file; m_needsMarker = marker; }
|
||||||
Location(const StackFrame &frame, bool marker = true);
|
Location(const StackFrame &frame, bool marker = true);
|
||||||
QString fileName() const { return m_fileName; }
|
QString fileName() const { return m_fileName; }
|
||||||
QString functionName() const { return m_functionName; }
|
QString functionName() const { return m_functionName; }
|
||||||
@@ -162,16 +162,14 @@ public:
|
|||||||
quint64 address() const { return m_address; }
|
quint64 address() const { return m_address; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void init() { m_needsMarker = false; m_needsRaise = true; m_lineNumber = -1;
|
bool m_needsMarker = false;
|
||||||
m_address = 0; m_hasDebugInfo = true; }
|
bool m_needsRaise = true;
|
||||||
bool m_needsMarker;
|
bool m_hasDebugInfo = true;
|
||||||
bool m_needsRaise;
|
int m_lineNumber = -1;
|
||||||
bool m_hasDebugInfo;
|
|
||||||
int m_lineNumber;
|
|
||||||
QString m_fileName;
|
QString m_fileName;
|
||||||
QString m_functionName;
|
QString m_functionName;
|
||||||
QString m_from;
|
QString m_from;
|
||||||
quint64 m_address;
|
quint64 m_address = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum LocationType { UnknownLocation, LocationByFile, LocationByAddress };
|
enum LocationType { UnknownLocation, LocationByFile, LocationByAddress };
|
||||||
|
|||||||
Reference in New Issue
Block a user