summaryrefslogtreecommitdiff
path: root/src/paramed_string.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/paramed_string.cc')
-rw-r--r--src/paramed_string.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/paramed_string.cc b/src/paramed_string.cc
index bed6760c..79e0ddd1 100644
--- a/src/paramed_string.cc
+++ b/src/paramed_string.cc
@@ -41,15 +41,15 @@ namespace paramed_string {
std::string toBase26(int32_t n, char zero, size_t width)
{
std::string res;
- if(n == 0 && width == 0) {
+ if (n == 0 && width == 0) {
width = 1;
}
- while(n) {
- res += zero+(n % 26);
+ while (n) {
+ res += zero + (n % 26);
n /= 26;
}
- if(width > res.size()) {
- res.append(width-res.size(), zero);
+ if (width > res.size()) {
+ res.append(width - res.size(), zero);
}
std::reverse(res.begin(), res.end());
return res;