Skip to content

Commit 2936654

Browse files
using unsigned int instead of uint in plotter.
1 parent 9865cfe commit 2936654

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

src/tests/class_tests/smartpeak/source/Widget_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ TEST(Widget, GenericTableWidget_searcher)
186186
EXPECT_TRUE(is_scanned); // updateTableContents is successful
187187

188188
const int all_selected_entry = 0;
189-
std::vector<uint> found_in;
189+
std::vector<unsigned int> found_in;
190190
ImGuiTextFilter filter("2mcit.2mcit_1.Heavy");
191191

192-
for (uint row = 0; row < Im_table_entries.size(); ++row) {
192+
for (auto row = 0; row < Im_table_entries.size(); ++row) {
193193
if (!TestTable1.searcher(Im_table_entries, all_selected_entry, filter, row)) {
194194
}
195195
}

src/widgets/include/SmartPeak/ui/Plotter.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace SmartPeak {
4343
*/
4444
class PlotLineProperties {
4545
public:
46-
PlotLineProperties(uint index = 0);
46+
PlotLineProperties(unsigned int index = 0);
4747

4848
/*
4949
@brief styles plot
@@ -64,7 +64,7 @@ namespace SmartPeak {
6464
6565
@param[out] grid line type
6666
*/
67-
static uint getGridLineType();
67+
static unsigned int getGridLineType();
6868

6969
/*
7070
@brief resets line count
@@ -87,8 +87,8 @@ namespace SmartPeak {
8787
void set(const std::pair<PlotLineSetting, std::string> &input);
8888

8989
private:
90-
uint line_index_;
91-
static uint line_count_;
90+
unsigned int line_index_;
91+
static unsigned int line_count_;
9292
std::string colour_;
9393
double line_width_ = 1;
9494
double point_size_ = 1;
@@ -195,16 +195,16 @@ namespace SmartPeak {
195195
*/
196196
void generatePlot_(std::ofstream &fout, const std::string &filename, const ExportedFormat exported_format);
197197

198-
uint nr_plots_;
198+
unsigned int nr_plots_;
199199
bool with_grid_;
200200
std::string output_path_;
201201
std::string filename = "smartpeak-exported-plot";
202202
std::string x_title_;
203203
std::string y_title_;
204204
std::string plot_title_;
205205
std::string gnuplot_path_;
206-
uint file_width_;
207-
uint file_height_;
206+
unsigned int file_width_;
207+
unsigned int file_height_;
208208
PlotType plot_type_;
209209
ExportedFormat exported_format_;
210210

src/widgets/source/ui/ExplorerWidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace SmartPeak
6161

6262
ImGui::Combo("In Column(s)", &selected_col_, cols_.data(), cols_.size());
6363

64-
for (uint checkbox_header_idx = 0; checkbox_header_idx < checkbox_headers_.size(); ++checkbox_header_idx) {
64+
for (auto checkbox_header_idx = 0; checkbox_header_idx < checkbox_headers_.size(); ++checkbox_header_idx) {
6565
if (checkbox_headers_(checkbox_header_idx) == "plot") checkbox_columns_plot_col_ = checkbox_header_idx;
6666
}
6767
table_entries_plot_col_ = (table_data_.headers_.size() + checkbox_columns_plot_col_);

src/widgets/source/ui/Plotter.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
namespace SmartPeak {
2727

28-
PlotLineProperties::PlotLineProperties(uint index)
28+
PlotLineProperties::PlotLineProperties(unsigned int index)
2929
{
3030
if (index==0) {
3131
line_index_ = ++(PlotLineProperties::line_count_);
@@ -111,7 +111,7 @@ namespace SmartPeak {
111111
return style;
112112
}
113113

114-
uint PlotLineProperties::line_count_ = 0;
114+
unsigned int PlotLineProperties::line_count_ = 0;
115115

116116
void PlotLineProperties::resetLineCount()
117117
{
@@ -123,7 +123,7 @@ namespace SmartPeak {
123123
return (line_type_.compare("none") == 0) ? true : false;
124124
}
125125

126-
uint PlotLineProperties::getGridLineType()
126+
unsigned int PlotLineProperties::getGridLineType()
127127
{
128128
return PlotLineProperties::linetype_cairo_term_.at(":");
129129
}
@@ -211,7 +211,7 @@ namespace SmartPeak {
211211
const std::vector<float> &x = graphvis_data_.x_data_area_.at(i);
212212
const std::vector<float> &y = graphvis_data_.y_data_area_.at(i);
213213
data_vals_file << "# PLOT " << (nr_plots_)++ << std::endl;
214-
for (uint i = 0; i < x.size(); ++i) {
214+
for (auto i = 0; i < x.size(); ++i) {
215215
data_vals_file << x[i] << "," << y[i] << std::endl;
216216
}
217217
data_vals_file << std::endl << std::endl;
@@ -343,7 +343,7 @@ namespace SmartPeak {
343343
if (with_grid_) {
344344
setGrid_(fout);
345345
}
346-
for (uint i = 0; i < plotlines_properties_.size(); ++i) {
346+
for (auto i = 0; i < plotlines_properties_.size(); ++i) {
347347
fout << plotlines_properties_[i].plotStyler() << std::endl;
348348
}
349349
} else {
@@ -353,7 +353,7 @@ namespace SmartPeak {
353353
if (with_grid_) {
354354
setGrid_(fout);
355355
}
356-
for (uint i = 0; i < plotlines_properties_.size(); ++i) {
356+
for (auto i = 0; i < plotlines_properties_.size(); ++i) {
357357
fout << plotlines_properties_[i].plotStyler() << std::endl;
358358
}
359359
}
@@ -379,7 +379,7 @@ namespace SmartPeak {
379379
if (with_grid_) {
380380
setGrid_(fout);
381381
}
382-
for (uint i = 0; i < plotlines_properties_.size(); ++i) {
382+
for (auto i = 0; i < plotlines_properties_.size(); ++i) {
383383
fout << plotlines_properties_[i].plotStyler() << std::endl;
384384
}
385385
}
@@ -466,7 +466,7 @@ namespace SmartPeak {
466466
fout << "set ylabel \"" << y_title_ << "\"" << std::endl;
467467
fout << "plot ";
468468

469-
for (uint i = 0; i < nr_plots_; ++i) {
469+
for (auto i = 0; i < nr_plots_; ++i) {
470470
std::string filename = output_path_ + this->filename+".dat";
471471
fout << "'" << filename << "' index " << i
472472
<< " title \"" << legends[i]

0 commit comments

Comments
 (0)