[Scummvm-git-logs] scummvm master -> e3756cf95039b3c63b399f458c4f91fd40e93b84

bluegr noreply at scummvm.org
Wed Oct 30 23:24:15 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e3756cf950 M4: Simplify more chunk getters


Commit: e3756cf95039b3c63b399f458c4f91fd40e93b84
    https://github.com/scummvm/scummvm/commit/e3756cf95039b3c63b399f458c4f91fd40e93b84
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2024-10-31T01:23:59+02:00

Commit Message:
M4: Simplify more chunk getters

Changed paths:
    engines/m4/adv_r/chunk_ops.cpp


diff --git a/engines/m4/adv_r/chunk_ops.cpp b/engines/m4/adv_r/chunk_ops.cpp
index 3b7f9b5ca38..7bcdeac92f1 100644
--- a/engines/m4/adv_r/chunk_ops.cpp
+++ b/engines/m4/adv_r/chunk_ops.cpp
@@ -316,13 +316,8 @@ entry_chunk *get_entry(Conv *c, int32 cSize) {
 }
 
 entry_chunk *get_hash_entry(Conv *c, int32 cSize) {
-	char *s = nullptr;
-	entry_chunk *e = nullptr;
-
-	s = &(c->conv[0]);
-	e = (entry_chunk *)&s[cSize];
-
-	return e;
+	char *s = &(c->conv[0]);
+	return (entry_chunk *)&s[cSize];
 }
 
 static void swap_text(text_chunk *t) {
@@ -443,12 +438,7 @@ int32 get_long(Conv *c, int32 cSize) {
 }
 
 char *get_string(Conv *c, int32 cSize) {
-	char *s = nullptr;
-	char *c_s = nullptr;
-
-	s = c->conv;
-	c_s = (char *)&s[cSize];
-	return c_s;
+	return &c->conv[cSize];
 }
 
 int conv_ops_cond_successful(int32 l_op, int32 op, int32 r_op) {




More information about the Scummvm-git-logs mailing list