You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/09/21 18:26:13 UTC

[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on pull request #866: NimBLE host: Change min/max macros to inline functions for C++

apache-mynewt-bot removed a comment on pull request #866:
URL: https://github.com/apache/mynewt-nimble/pull/866#issuecomment-696285134


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### porting/nimble/include/os/os.h
   <details>
   
   ```diff
   @@ -25,16 +25,24 @@
    #ifdef __cplusplus
    extern "C" {
    
   -inline int max(int a, int b) { return((a) > (b) ? a : b); }
   -inline int min(int a, int b) { return((a) < (b) ? a : b); }
   +inline int
   +max(int a, int b)
   +{
   +    return((a) > (b) ? a : b);
   +}
   +inline int
   +min(int a, int b)
   +{
   +    return((a) < (b) ? a : b);
   +}
    
    #else
    #ifndef min
   -#define min(a, b) ((a)<(b)?(a):(b))
   +#define min(a, b) ((a) < (b) ? (a) : (b))
    #endif
    
    #ifndef max
   -#define max(a, b) ((a)>(b)?(a):(b))
   +#define max(a, b) ((a) > (b) ? (a) : (b))
    #endif
    
    #endif
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org