Add Profiler methodmap#814
Merged
psychonic merged 4 commits intoalliedmodders:masterfrom Jul 8, 2018
Headline:profiler-type
Merged
Add Profiler methodmap#814psychonic merged 4 commits intoalliedmodders:masterfrom Headline:profiler-type
psychonic merged 4 commits intoalliedmodders:masterfrom
Headline:profiler-type
Conversation
peace-maker
reviewed
May 9, 2018
Member
peace-maker
left a comment
There was a problem hiding this comment.
This should apply to all similar new methodmaps.
| * @param prof Profiling object. | ||
| * @error Invalid Handle. | ||
| */ | ||
| native void StartProfiling(Handle prof); |
Member
There was a problem hiding this comment.
Thinking about changes like that - we don't have to change the tag here for old natives. This change will just make old code throw tag mismatch warnings if the profiler is just stored in a Handle variable.
Member
There was a problem hiding this comment.
Are you sure? I thought that was handled silently.
Member
There was a problem hiding this comment.
Just the other way around of expecting a Handle param but passing a methodmap X < Handle.
methodmap CoolNewThing < Handle {
};
native void DoStuff(CoolNewThing t);
native void DoMore(Handle t);
public void OnPluginStart()
{
Handle thing;
DoStuff(thing); // warning 213: tag mismatch
CoolNewThing newThing;
DoMore(newThing); // ok
}thanks pm
Member
Author
|
My bad, thought those wouldn't throw mismatches. Hopefully all is well now. |
asherkin
approved these changes
May 9, 2018
Across sm we use `//` for methodmap docs, so lets just keep this consistent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Think this is one of the last Handle types without a method map, decided to piece together a small patch to change that.