diff options
author | Chris Warren-Smith | 2011-08-14 09:42:31 +1000 |
---|---|---|
committer | Chris Warren-Smith | 2011-08-21 16:38:53 +1000 |
commit | 2e77b97b1984e32690ab3864af931553d5272767 (patch) | |
tree | d8736873001a67f2b31d5f39954e4e7719a3b336 /backends/platform/bada | |
parent | ad58d2feafe2e85961e57ef05d4061d51dfb2172 (diff) | |
download | scummvm-rg350-2e77b97b1984e32690ab3864af931553d5272767.tar.gz scummvm-rg350-2e77b97b1984e32690ab3864af931553d5272767.tar.bz2 scummvm-rg350-2e77b97b1984e32690ab3864af931553d5272767.zip |
BADA: Code formatting; replace tab before else with space
Diffstat (limited to 'backends/platform/bada')
-rwxr-xr-x | backends/platform/bada/application.cpp | 2 | ||||
-rwxr-xr-x | backends/platform/bada/audio.cpp | 10 | ||||
-rwxr-xr-x | backends/platform/bada/form.cpp | 4 | ||||
-rwxr-xr-x | backends/platform/bada/fs.cpp | 18 | ||||
-rwxr-xr-x | backends/platform/bada/sscanf.cpp | 12 | ||||
-rwxr-xr-x | backends/platform/bada/system.cpp | 4 |
6 files changed, 25 insertions, 25 deletions
diff --git a/backends/platform/bada/application.cpp b/backends/platform/bada/application.cpp index d5bd1572be..af4e3fc6ef 100755 --- a/backends/platform/bada/application.cpp +++ b/backends/platform/bada/application.cpp @@ -71,7 +71,7 @@ void BadaScummVM::OnUserEventReceivedN(RequestId requestId, if (requestId == USER_MESSAGE_EXIT) { // normal program termination Terminate(); - } else if (requestId == USER_MESSAGE_EXIT_ERR) { + } else if (requestId == USER_MESSAGE_EXIT_ERR) { // assertion failure termination String *message = null; if (args) { diff --git a/backends/platform/bada/audio.cpp b/backends/platform/bada/audio.cpp index 3510475b5c..8f4252737f 100755 --- a/backends/platform/bada/audio.cpp +++ b/backends/platform/bada/audio.cpp @@ -91,7 +91,7 @@ int AudioThread::setVolume(bool up, bool minMax) { if (minMax) {
level = up ? numLevels - 1 : 0;
volume = levels[level];
- } else {
+ } else {
// adjust volume to be one of the preset values
for (int i = 0; i < numLevels && level == -1; i++) {
if (volume == levels[i]) {
@@ -100,7 +100,7 @@ int AudioThread::setVolume(bool up, bool minMax) { if (i + 1 < numLevels) {
level = i + 1;
}
- } else if (i > 0) {
+ } else if (i > 0) {
level = i - 1;
}
}
@@ -170,7 +170,7 @@ bool AudioThread::OnStart(void) { if (E_KEY_NOT_FOUND == registry->Get(CONFIG_KEY, volume)) {
registry->Add(CONFIG_KEY, volume);
volume = levels[INIT_LEVEL];
- } else {
+ } else {
AppLog("Setting volume: %d", volume);
}
}
@@ -218,7 +218,7 @@ void AudioThread::OnAudioOutBufferEndReached(Osp::Media::AudioOut &src) { _audioOut->WriteBuffer(_audioBuffer[_tail]);
_tail = (_tail + 1 == NUM_AUDIO_BUFFERS ? 0 : _tail + 1);
_ready--;
- } else {
+ } else {
// audio buffer empty: decrease timer inverval
_playing = -1;
_interval -= TIMER_INCREMENT;
@@ -236,7 +236,7 @@ void AudioThread::OnTimerExpired(Timer &timer) { _head = (_head + 1 == NUM_AUDIO_BUFFERS ? 0 : _head + 1);
_ready++;
}
- } else {
+ } else {
// audio buffer full: increase timer inverval
_interval += TIMER_INCREMENT;
if (_interval > MAX_TIMER_INTERVAL) {
diff --git a/backends/platform/bada/form.cpp b/backends/platform/bada/form.cpp index 92b3f07179..d6504baf3b 100755 --- a/backends/platform/bada/form.cpp +++ b/backends/platform/bada/form.cpp @@ -89,7 +89,7 @@ result BadaAppForm::Construct() { delete _gameThread;
_gameThread = null;
}
- } else {
+ } else {
g_system = badaSystem;
}
@@ -418,7 +418,7 @@ void BadaAppForm::OnKeyPressed(const Control &source, KeyCode keyCode) { case KEY_SIDE_UP:
if (_shortcutIndex != SHORTCUT_VOLUME) {
_shortcutIndex = SHORTCUT_VOLUME;
- } else {
+ } else {
setVolume(true, false);
}
return;
diff --git a/backends/platform/bada/fs.cpp b/backends/platform/bada/fs.cpp index 73492101ce..22684aeeec 100755 --- a/backends/platform/bada/fs.cpp +++ b/backends/platform/bada/fs.cpp @@ -117,7 +117,7 @@ bool BadaFileStream::seek(int32 offs, int whence) { SetLastResult(E_SUCCESS); bufferIndex += offs; return true; - } else { + } else { offs -= (bufferLength - bufferIndex); if (offs < 0 && file->Tell() + offs < 0) { // avoid negative positioning @@ -126,7 +126,7 @@ bool BadaFileStream::seek(int32 offs, int whence) { if (offs != 0) { SetLastResult(file->Seek(FILESEEKPOSITION_CURRENT, offs)); result = (E_SUCCESS == GetLastResult()); - } else { + } else { result = true; } } @@ -162,7 +162,7 @@ uint32 BadaFileStream::read(void *ptr, uint32 len) { memcpy((byte*) ptr, &buffer[bufferIndex], len); bufferIndex += len; result = len; - } else { + } else { // use remaining allocation memcpy((byte*) ptr, &buffer[bufferIndex], available); uint32 remaining = len - available; @@ -173,7 +173,7 @@ uint32 BadaFileStream::read(void *ptr, uint32 len) { } bufferIndex = bufferLength = 0; } - } else if (len < BUFFER_SIZE) { + } else if (len < BUFFER_SIZE) { // allocate and use buffer bufferIndex = 0; bufferLength = file->Read(buffer, BUFFER_SIZE); @@ -184,11 +184,11 @@ uint32 BadaFileStream::read(void *ptr, uint32 len) { memcpy((byte*) ptr, buffer, len); result = bufferIndex = len; } - } else { + } else { result = file->Read((byte*) ptr, len); bufferIndex = bufferLength = 0; } - } else { + } else { AppLog("Attempted to read past EOS"); } return result; @@ -318,10 +318,10 @@ bool BadaFilesystemNode::getChildren(AbstractFSList &myList, myList.push_back(new BadaFilesystemNode("/Media")); myList.push_back(new BadaFilesystemNode("/Storagecard")); result = true; // no more entries - } else if (_path == "/Storagecard") { + } else if (_path == "/Storagecard") { myList.push_back(new BadaFilesystemNode("/Storagecard/Media")); result = true; // no more entries - } else if (_path == "/Home") { + } else if (_path == "/Home") { // ensure share path is always included myList.push_back(new BadaFilesystemNode("/Home/Share")); myList.push_back(new BadaFilesystemNode("/Home/Share2")); @@ -335,7 +335,7 @@ bool BadaFilesystemNode::getChildren(AbstractFSList &myList, // open directory if (IsFailed(pDir->Construct(_unicodePath))) { AppLog("Failed to open directory"); - } else { + } else { // read all directory entries pDirEnum = pDir->ReadN(); if (pDirEnum) { diff --git a/backends/platform/bada/sscanf.cpp b/backends/platform/bada/sscanf.cpp index 2321833477..ddf7eafe94 100755 --- a/backends/platform/bada/sscanf.cpp +++ b/backends/platform/bada/sscanf.cpp @@ -42,7 +42,7 @@ bool scanInt(const char **in, va_list *ap, int max) { bool err = false;
if (end == *in || (max > 0 && (end - *in) > max)) {
err = true;
- } else {
+ } else {
*arg = (int)n;
*in = end;
}
@@ -130,12 +130,12 @@ extern "C" int simple_sscanf(const char *input, const char *format, ...) { // assume %[^c]
if ('^' != *format) {
err = true;
- } else {
+ } else {
format++;
if (*format && *(format+1) == ']') {
err = scanStringUntil(&next, &ap, *format);
format += 2;
- } else {
+ } else {
err = true;
}
}
@@ -147,10 +147,10 @@ extern "C" int simple_sscanf(const char *input, const char *format, ...) { if (err) {
break;
- } else {
+ } else {
result++;
}
- } else if (*format++ != *next++) {
+ } else if (*format++ != *next++) {
// match input
break;
}
@@ -174,7 +174,7 @@ int main(int argc, char *pArgv[]) { "CAT %dx%d %x FONT %[^\n] %06u.AUD %c",
&x, &y, &h, b, &u, &c) != 6) {
printf("Failed\n");
- } else {
+ } else {
printf("Success %d %d %d %s %d '%c'\n", x, y, h, buffer, u, c);
}
return 0;
diff --git a/backends/platform/bada/system.cpp b/backends/platform/bada/system.cpp index 9cc7f450fe..8192ae8bbd 100755 --- a/backends/platform/bada/system.cpp +++ b/backends/platform/bada/system.cpp @@ -311,7 +311,7 @@ void BadaSystem::initBackend() { if (E_SUCCESS != initModules()) {
AppLog("initModules failed");
- } else {
+ } else {
OSystem::initBackend();
}
@@ -414,7 +414,7 @@ void BadaSystem::exitSystem() { void BadaSystem::logMessage(LogMessageType::Type type, const char *message) {
if (type == LogMessageType::kError) {
systemError(message);
- } else {
+ } else {
AppLog(message);
}
}
|