1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

SrsContextId assignment can be improved without create a duplicated one. v5.0.175 v6.0.70 (#3503)

SrsContextId object creation can be improved on `srs_protocol_log.cpp`,
No need to create one, then assign it back. It seems a common mistake
for Cpp programmers.

---------

Co-authored-by: john <hondaxiao@tencent.com>
This commit is contained in:
Jacob Su 2023-08-28 15:51:23 +08:00 committed by GitHub
parent cff5064d0b
commit bb9331186b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 3 deletions

View file

@ -9,6 +9,6 @@
#define VERSION_MAJOR 5
#define VERSION_MINOR 0
#define VERSION_REVISION 174
#define VERSION_REVISION 175
#endif

View file

@ -9,6 +9,6 @@
#define VERSION_MAJOR 6
#define VERSION_MINOR 0
#define VERSION_REVISION 69
#define VERSION_REVISION 70
#endif

View file

@ -33,7 +33,7 @@ SrsThreadContext::~SrsThreadContext()
SrsContextId SrsThreadContext::generate_id()
{
SrsContextId cid = SrsContextId();
SrsContextId cid;
return cid.set_value(srs_random_str(8));
}