Welcome to mirror list, hosted at ThFree Co, Russian Federation.

base.cpp « base - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 82a9b016b1848ad68e3f0414ca1a12555de394b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "base/base.hpp"
#include "base/assert.hpp"
#include "base/exception.hpp"

#include "std/target_os.hpp"

#include <iostream>

namespace my
{
  bool OnAssertFailedDefault(SrcPoint const & srcPoint, std::string const & msg)
  {
    std::cerr << "ASSERT FAILED" << std::endl
              << srcPoint.FileName() << ":" << srcPoint.Line() << std::endl
              << msg << std::endl;
    return true;
  }

  AssertFailedFn OnAssertFailed = &OnAssertFailedDefault;

  AssertFailedFn SetAssertFunction(AssertFailedFn fn)
  {
    std::swap(OnAssertFailed, fn);
    return fn;
  }
}