Skip to content

Commit 1155d34

Browse files
committed
Fixed nits
1 parent 25c7506 commit 1155d34

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

src/TargetDescription.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* -*- Mode: C++; tab-width: 8; c-basic-offset: 2; indent-tabs-mode: nil; -*- */
2+
13
#include "TargetDescription.h"
24
#include "GdbServerConnection.h"
35
#include "kernel_abi.h"
@@ -7,13 +9,13 @@ namespace rr {
79

810
class FeatureStream {
911
public:
10-
std::string result() { return stream.str(); }
12+
string result() { return stream.str(); }
1113

1214
template <typename Any>
1315
friend FeatureStream& operator<<(FeatureStream& stream, Any any);
1416

1517
private:
16-
std::stringstream stream;
18+
stringstream stream;
1719
const char* arch_prefix;
1820
};
1921

@@ -115,7 +117,7 @@ static const char header[] = R"(<?xml version="1.0"?>
115117
<target>
116118
)";
117119

118-
std::string TargetDescription::to_xml() const {
120+
string TargetDescription::to_xml() const {
119121
FeatureStream fs;
120122
fs << header << arch << "<osabi>GNU/Linux</osabi>\n";
121123
for (const auto feature : target_features) {

src/TargetDescription.h

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
#pragma once
1+
/* -*- Mode: C++; tab-width: 8; c-basic-offset: 2; indent-tabs-mode: nil; -*- */
2+
3+
#ifndef RR_TARGET_DESCRIPTION_H_
4+
#define RR_TARGET_DESCRIPTION_H_
5+
26
#include "kernel_abi.h"
37
#include <cstdint>
48

5-
namespace rr {
9+
using namespace std;
610

7-
struct GdbServerRegisterValue;
11+
namespace rr {
812

913
enum class TargetFeature : uint32_t {
1014
Core = 0,
@@ -17,11 +21,14 @@ enum class TargetFeature : uint32_t {
1721
};
1822

1923
class TargetDescription {
20-
SupportedArch arch;
21-
std::vector<TargetFeature> target_features;
22-
2324
public:
2425
explicit TargetDescription(rr::SupportedArch arch, uint32_t cpu_features);
25-
std::string to_xml() const;
26+
string to_xml() const;
27+
28+
private:
29+
SupportedArch arch;
30+
vector<TargetFeature> target_features;
2631
};
27-
} // namespace rr
32+
} // namespace rr
33+
34+
#endif /* RR_TARGET_DESCRIPTION_H_ */

0 commit comments

Comments
 (0)