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

Apply some ReSharper fixes to our code #2199

Merged
merged 8 commits into from
Jun 10, 2019
Merged

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Jun 10, 2019

Two types of changes:

  1. Systematic changes of things that we always want (e.g., unused using clauses).
  2. Proposed changes that we may or may not want applied by hand.

No contentious things like adjusting naming conventions or reformatting.

@@ -367,13 +364,13 @@ internal class MainWindow : SupervisedWindowRenderer {
value : must_record_journal_,
text : "Record journal (starts on load)");
UnityEngine.GUILayout.Label(
"Journalling is " + (journaling_ ? "ON" : "OFF"),
"Journalling is " + (journalling_ ? "ON" : "OFF"),
Copy link
Member

Choose a reason for hiding this comment

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

It seems the spelling of the variable was good and that the string should be changed instead: https://www.lexico.com/en/definition/journal.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

var value_if_boxed = managed_object as T?;
if (value_if_boxed != null) {
value = value_if_boxed.Value;
if (managed_object is T value_if_boxed) {
Copy link
Member

Choose a reason for hiding this comment

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

Fancy!

Sorry, something went wrong.

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed, it does that with a single click. I didn't even know that this existed.

Sorry, something went wrong.

@eggrobin eggrobin added the LGTM label Jun 10, 2019
@pleroy pleroy merged commit 782fdc6 into mockingbirdnest:master Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants