-
Notifications
You must be signed in to change notification settings - Fork 246
Refactor server chat handling by extracting methods #3741
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1223,6 +1223,13 @@ class MathUtils | |
| return powf ( 10.0f, ( fInValueRange0_1 - 1.0f ) * AUD_MIX_FADER_RANGE_DB / 20.0f ); | ||
| } | ||
| } | ||
|
|
||
| // return true if a value is within the lower and upper bounds (inclusively), otherwise false | ||
| template<typename T> | ||
| static inline bool InRange ( T value, T lower, T upper ) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Java/C# programmer in me wants this as an extension to returns true. Don't know if C++ can do better than what you've got here, though. (What you should do is constraint
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This function cannot be called from the outside so I think we should be safe here. |
||
| { | ||
| return !( value < lower || value > upper ); | ||
| } | ||
| }; | ||
|
|
||
| /******************************************************************************\ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.