diff options
author | 2023-10-28 20:05:49 +0600 | |
---|---|---|
committer | 2023-10-28 20:05:49 +0600 | |
commit | 7455c3d0bda6ab60d3f67fafd0ce04428143bcbe (patch) | |
tree | 4a139278995f0602469b10223aaa448ae0a967f9 /src/main.c | |
parent | c47100c331e1fcc4353b6ed83a1d3485c9331eaf (diff) | |
download | c-obp-example-7455c3d0bda6ab60d3f67fafd0ce04428143bcbe.tar.gz c-obp-example-7455c3d0bda6ab60d3f67fafd0ce04428143bcbe.zip |
Use better names for reference helpers
Signed-off-by: Mubashshir <ahmubashshir@gmail.com>
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -5,9 +5,10 @@ #include "teams.h" #include "common.h" -// ref(type) references content is always const -// mut(type) references content is mutable -void process(const ref(char) line, unsigned idx, team obj) +// ref(type) -> const ref to const data +// mut(type) -> const ref to mut data +// ptr(type) -> mut ref to mut data +void process(ref(char) line, unsigned idx, team obj) { unsigned s; switch(idx) { @@ -35,7 +36,7 @@ int main() { unsigned num = 0, i = 0; char line[255] = ""; - team *teams; + ptr(team) teams; getline(line, 255, stdin); consume(line, 255, sscanf, "%u", &num); |