Revision 3220991eadecab0b1ab062a91e547d71e7350ef4 authored by Dmitri Naumov on 27 March 2023, 16:02:43 UTC, committed by Dmitri Naumov on 28 March 2023, 20:57:06 UTC
Replace assertion; If collection is empty, the condition is fulfilled.
1 parent 56a047a
DisableFPE.h
/**
* \file
* \copyright
* Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#if !defined(_WIN32) && !defined(__APPLE__)
#include <cfenv>
class DisableFPE
{
public:
DisableFPE()
{
fegetenv(&fe_env); // Store floating-point exception handling.
fesetenv(FE_DFL_ENV); // Set default environment effectively disabling
// exceptions.
}
~DisableFPE()
{
fesetenv(&fe_env); // Restore floating-point exception handling.
}
private:
fenv_t fe_env;
};
#else
// No-op for Windows and Apple
class DisableFPE
{
};
#endif
Computing file changes ...