summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-05-28 12:01:05 +0200
committerPierre Bourdon <delroth@gmail.com>2014-05-28 12:01:05 +0200
commit0602dacfde511c954904bfaaabce3e2115c609ea (patch)
tree9fd91307d54f8970ddf31bd2baf120eb17a91291 /Source/Core
parent3c722b6be7b69bfb179b3ba8bfe749f0512c3ea5 (diff)
parent4cb111e5db3af9e273b3f2c02596ee882e7f6fd3 (diff)
Merge pull request #423 from lioncash/dsp-clarification
Clarify what FindBrackets does in the DSP assembler
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/DSP/DSPAssembler.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/Core/Core/DSP/DSPAssembler.cpp b/Source/Core/Core/DSP/DSPAssembler.cpp
index 064428a640..0ac98bfd61 100644
--- a/Source/Core/Core/DSP/DSPAssembler.cpp
+++ b/Source/Core/Core/DSP/DSPAssembler.cpp
@@ -268,8 +268,18 @@ s32 DSPAssembler::ParseValue(const char *str)
return val;
}
-// Modifies both src and dst!
-// What does it do, really??
+// This function splits the given src string into three parts:
+// - Text before the first opening ('(') parenthesis
+// - Text within the first and last opening ('(') and closing (')') parentheses.
+// - If text follows after these parentheses, then this is what is returned from the function.
+//
+// Note that the first opening parenthesis and the last closing parenthesis are discarded from the string.
+// For example: Say "Test (string) 1234" is the string passed in as src.
+//
+// - src will become "Test "
+// - dst will become "string"
+// - Returned string from the function will be " 1234"
+//
char *DSPAssembler::FindBrackets(char *src, char *dst)
{
s32 len = (s32) strlen(src);