Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for WorldInfo use #88

Merged
merged 1 commit into from Oct 22, 2012
Merged

Fix for WorldInfo use #88

merged 1 commit into from Oct 22, 2012

Conversation

litoris
Copy link
Contributor

@litoris litoris commented Oct 14, 2012

@@ -934,18 +935,23 @@ begin
if (Length(Players[CurrentPlayer].WorldInfo) < 1) then
Players[CurrentPlayer].WorldInfo := [Players[CurrentPlayer].Member, 0, AllowPVP];

if (Players[CurrentPlayer].WorldInfo[0]) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just do B := Players[CurrentPlayer].WorldInfo[0]; There's no need to the if statements. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it that way because that's the way B and BB were arranged in the original code. It doesn't change anything in terms of functionality so I think it's fine. You can edit it if you really want?

@litoris
Copy link
Contributor Author

litoris commented Oct 15, 2012

@Coh3n I posted next to your comment but posting here too,

I did it that way because that's the way B and BB were arranged in the original code. It doesn't change anything in terms of functionality so I think it's fine. You can edit it if you really want?
BTW I found the original release thread for this piece of code, it's from march 2010, and a dev(Wanted) made it that way so he probably had a good reason to do so.

@cohenadair
Copy link
Member

Well it makes no difference in this situation, but it is more efficient because the compiler doesn't have to read the if..then statement. But you're right, it really doesn't matter that much. I'd rather not mess with something that already works.

cohenadair added a commit that referenced this pull request Oct 22, 2012
@cohenadair cohenadair merged commit a90b7f3 into SRL:master Oct 22, 2012
@riwu riwu mentioned this pull request Oct 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants