Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boy scout rule: Fixed format strings of uint/char SGVector::display_vector() methods. #1307

Merged
merged 1 commit into from
Jul 25, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/shogun/lib/SGVector.cpp
Expand Up @@ -402,7 +402,7 @@ void SGVector<char>::display_vector(const char* vector, int32_t n, const char* n
ASSERT(n>=0)
SG_SPRINT("%s%s=[", prefix, name)
for (int32_t i=0; i<n; i++)
SG_SPRINT("%s%c%s", prefix, vector[i], i==n-1? "" : ",")
SG_SPRINT("%s%d%s", prefix, vector[i], i==n-1? "" : ",")
SG_SPRINT("%s]\n", prefix)
}

Expand All @@ -413,7 +413,7 @@ void SGVector<uint8_t>::display_vector(const uint8_t* vector, int32_t n, const c
ASSERT(n>=0)
SG_SPRINT("%s%s=[", prefix, name)
for (int32_t i=0; i<n; i++)
SG_SPRINT("%s%d%s", prefix, vector[i], i==n-1? "" : ",")
SG_SPRINT("%s%u%s", prefix, vector[i], i==n-1? "" : ",")
SG_SPRINT("%s]\n", prefix)
}

Expand All @@ -435,7 +435,7 @@ void SGVector<uint16_t>::display_vector(const uint16_t* vector, int32_t n, const
ASSERT(n>=0)
SG_SPRINT("%s%s=[", prefix, name)
for (int32_t i=0; i<n; i++)
SG_SPRINT("%s%d%s", prefix, vector[i], i==n-1? "" : ",")
SG_SPRINT("%s%u%s", prefix, vector[i], i==n-1? "" : ",")
SG_SPRINT("%s]\n", prefix)
}

Expand Down Expand Up @@ -468,7 +468,7 @@ void SGVector<uint32_t>::display_vector(const uint32_t* vector, int32_t n, const
ASSERT(n>=0)
SG_SPRINT("%s%s=[", prefix, name)
for (int32_t i=0; i<n; i++)
SG_SPRINT("%s%d%s", prefix, vector[i], i==n-1? "" : ",")
SG_SPRINT("%s%u%s", prefix, vector[i], i==n-1? "" : ",")
SG_SPRINT("%s]\n", prefix)
}

Expand Down