Menu

#2567 log: duplicated code in lga_client and lga_stream

5.17.11
fixed
nobody
None
enhancement
log
lib
minor
False
2017-10-30
2017-08-31
No

LogClient and LogStreamInfo class have same three methods with same code, they are:

```c++
int32_t FetchAndIncreaseRefCounter(bool* updated);
int32_t FetchAndDecreaseRefCounter(bool* updated);
void RestoreRefCounter(RefCounterDegree value, bool updated);
```

It is better to create independent RefCounter class with these methods.

Related

Wiki: ChangeLog-5.17.11

Discussion

  • Vu Minh Nguyen

    Vu Minh Nguyen - 2017-09-01
    • status: assigned --> review
     
  • Vu Minh Nguyen

    Vu Minh Nguyen - 2017-10-02
    • status: review --> fixed
    • assigned_to: Vu Minh Nguyen --> nobody
     
  • Vu Minh Nguyen

    Vu Minh Nguyen - 2017-10-02

    commit ffbeba61513e28ce862eaa735ed75e8243f881b8 (HEAD, origin/develop, develop)
    Author: Vu Minh Nguyen vu.m.nguyen@dektech.com.au
    Date: Mon Oct 2 09:34:50 2017 +0700

    log: remove duplicated code in lga_client and lga_stream [#2567]
    
    Introduce `RefCounter` class to remove duplicated code in LogClient
    and LogStreamInfo. Introduce also one new parameter `caller`,
    the purpose mainly is for debugging.
    
     

Log in to post a comment.