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

Cast.h « system « intern « freestyle « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 31504a072258afc21fbe99a20fb2428726b56699 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* SPDX-License-Identifier: GPL-2.0-or-later */

#pragma once

/** \file
 * \ingroup freestyle
 * \brief Cast function
 */

namespace Freestyle {

namespace Cast {
template<class T, class U> U *cast(T *in)
{
  if (!in) {
    return NULL;
  }
  return dynamic_cast<U *>(in);
}
}  // end of namespace Cast

} /* namespace Freestyle */