Skip to content

Commit fdda92f

Browse files
committed
Removed warnings
1 parent 1476ef4 commit fdda92f

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/outputting.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ inline float calculateAvg(std::vector<float>& times, size_t count=0)
9292
void appendAvg(std::vector<std::string>& scrambleLines, float avg, std::string avgName)
9393
{
9494
// Smaller level = higher up.
95-
int level = 0;
95+
size_t level = 0;
9696

9797
if (avgName == "ao5")
9898
{
@@ -178,7 +178,7 @@ void output(std::string scramble, std::vector<float>& times)
178178

179179
for (std::string &line : scrambleLines)
180180
{
181-
if(line.length() < 0){
181+
if(!line.empty()){
182182
if (line.at(0) == ' ')
183183
{
184184
line.erase(0, 1);
@@ -272,4 +272,5 @@ void outputVersion()
272272
std::cout << "Changed how outputting mean works." << std::endl;
273273
std::cout << "Added ao5, 12, 50 and 100" << std::endl;
274274
std::cout << "Made outputting mean (and averages) look better" << std::endl;
275+
std::cout << "Removed warnings" << std::endl;
275276
}

src/square_one.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ namespace sq1
100100
pieces = doRotateTopAndBottom(pieces, top, bottom);
101101
doSlash(pieces);
102102

103-
scramble += "(" + std::to_string(top) + ", " + std::to_string(bottom) + ") / ";
103+
scramble += "(";
104+
scramble += std::to_string(top);
105+
scramble += ", "; // This is done to remove a warning.
106+
scramble += std::to_string(bottom);
107+
scramble += ") / ";
104108
}
105109
if (rng() % 2 == 0)
106110
{

0 commit comments

Comments
 (0)