Commit fdbabe99 authored by Laurent Montel's avatar Laurent Montel 😁

Astyle kdelibs

parent 42be69e6
......@@ -15,7 +15,6 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "rot13jobtest.h"
#include <QTest>
......
......@@ -15,7 +15,6 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef ROT13JOBTEST_H
#define ROT13JOBTEST_H
......
......@@ -41,14 +41,14 @@ QString Rot13Job::rot13() const
QString r(mInitialText);
const int rLenght(r.length());
for (int i=0; i<rLenght; ++i) {
for (int i = 0; i < rLenght; ++i) {
const QChar rChar(r.at(i));
if ( ( rChar >= QLatin1Char('A') && rChar <= QLatin1Char('M') ) ||
( rChar >= QLatin1Char('a') && rChar <= QLatin1Char('m') ) ) {
if ((rChar >= QLatin1Char('A') && rChar <= QLatin1Char('M')) ||
(rChar >= QLatin1Char('a') && rChar <= QLatin1Char('m'))) {
r[i] = (char)((int)QChar(r[i]).toLatin1() + 13);
} else {
if ( ( rChar >= QLatin1Char('N') && rChar <= QLatin1Char('Z') ) ||
( rChar >= QLatin1Char('n') && rChar <= QLatin1Char('z') ) ) {
if ((rChar >= QLatin1Char('N') && rChar <= QLatin1Char('Z')) ||
(rChar >= QLatin1Char('n') && rChar <= QLatin1Char('z'))) {
r[i] = (char)((int)QChar(r[i]).toLatin1() - 13);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment