LCOV - code coverage report
Current view: top level - libreoffice/solver/unxlngi6.pro/inc/tools - helpers.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 6 6 100.0 %
Date: 2012-12-17 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  */
       9             : #ifndef _TOOLS_HELPERS_HXX
      10             : #define _TOOLS_HELPERS_HXX
      11             : 
      12     2345417 : inline long MinMax( long nVal, long nMin, long nMax )
      13             : {
      14     2345417 :     return nVal >= nMin ? ( nVal <= nMax ? nVal : nMax ) : nMin;
      15             : }
      16             : 
      17          58 : inline long AlignedWidth4Bytes( long nWidthBits )
      18             : {
      19          58 :     return ( ( nWidthBits + 31 ) >> 5 ) << 2;
      20             : }
      21             : 
      22       77277 : inline long FRound( double fVal )
      23             : {
      24       77277 :     return fVal > 0.0 ? static_cast<long>( fVal + 0.5 ) : -static_cast<long>( -fVal + 0.5 );
      25             : }
      26             : 
      27             : #endif
      28             : 
      29             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10