当前位置: 首页>>代码示例>>C++>>正文


C++ RAMEN_ASSERT函数代码示例

本文整理汇总了C++中RAMEN_ASSERT函数的典型用法代码示例。如果您正苦于以下问题:C++ RAMEN_ASSERT函数的具体用法?C++ RAMEN_ASSERT怎么用?C++ RAMEN_ASSERT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了RAMEN_ASSERT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: normalize

    void normalize()
    {
        T l = length();
        RAMEN_ASSERT( l > T(0));

        x /= l;
        y /= l;
        z /= l;
    }
开发者ID:devernay,项目名称:ramen-1,代码行数:9,代码来源:vector3.hpp

示例2: RAMEN_ASSERT

    vector3_t<T>& operator/=( T s)
    {
        RAMEN_ASSERT( s != T(0));

        x /= s;
        y /= s;
        z /= s;
        return *this;
    }
开发者ID:devernay,项目名称:ramen-1,代码行数:9,代码来源:vector3.hpp

示例3: cu_ctx_destroy

void cu_ctx_destroy( CUcontext ctx)
{
	RAMEN_ASSERT( cuCtxDestroy_);

	// in this case, we don't check for errors, as
	// this is used in a destructor, and there's not much
	// we can do about it anyway.
	cuCtxDestroy_( ctx);
}
开发者ID:JohanAberg,项目名称:Ramen,代码行数:9,代码来源:cuda.cpp

示例4: RAMEN_ASSERT

void graph_t::add_node( node_t *v)
{
	RAMEN_ASSERT( !has_node( v));

	vertex_desc_type vd = boost::add_vertex( graph_);
	graph_[vd].node = v;
	node_to_desc_[v] = vd;
	valid_order_ = false;
}
开发者ID:JohanAberg,项目名称:Ramen,代码行数:9,代码来源:graph.cpp

示例5: RAMEN_ASSERT

void clipboard_t::copy_keys( const std::string& name, const anim::any_curve_ptr_t& c)
{
	RAMEN_ASSERT( copying_);
	
	copy_curves_mode_ = false;
	contents_.push_back( named_curve_type( name, boost::shared_ptr<any_curve_t>()));
	copy_keys_visitor v( contents_.back().second);
	boost::apply_visitor( v, c);
}
开发者ID:JohanAberg,项目名称:Ramen,代码行数:9,代码来源:clipboard.cpp

示例6: RAMEN_ASSERT

void yaml_oarchive_t::write_composition_header()
{
	RAMEN_ASSERT( !header_written_);

	out_ << YAML::Key << "magic"	<< YAML::Value << "Ramen composition";
	out_ << YAML::Key << "version"	<< YAML::Value << version;
	check_errors();
	header_written_ = true;
}
开发者ID:JohanAberg,项目名称:Ramen,代码行数:9,代码来源:yaml_oarchive.cpp

示例7: add_level

	void add_level( const Sampler& sampler)
	{
		RAMEN_ASSERT( has_top_sampler_);

		samplers_.push_back( sampler);

		float scale = scales_.back() * 0.5f;
		scales_.push_back( scale);
		iscales_.push_back( 1.0f / scale);
	}
开发者ID:JohanAberg,项目名称:Ramen,代码行数:10,代码来源:mipmap_sampler.hpp

示例8: set_top_level

	void set_top_level( const TopLevelSampler& sampler)
	{
		RAMEN_ASSERT( !has_top_sampler_);

		top_sampler_ = sampler;
		has_top_sampler_ = true;

		scales_.push_back( 1.0f);
		iscales_.push_back( 1.0f);
	}
开发者ID:JohanAberg,项目名称:Ramen,代码行数:10,代码来源:mipmap_sampler.hpp

示例9: RAMEN_ASSERT

composition_t *param_t::composition()
{
    RAMEN_ASSERT( param_set());
    parameterised_t *p = parameterised();

    if( p)
        return p->composition();
    else
        return 0;
}
开发者ID:devernay,项目名称:ramen-1,代码行数:10,代码来源:param.cpp

示例10: deallocate

    void deallocate( unsigned char *p, std::size_t s)
	{
		if( p == 0)
			return;

		RAMEN_ASSERT( s != 0);

	    boost::lock_guard<boost::recursive_mutex> lock( mutex_);
	    pool_.deallocate( p, s);
	}
开发者ID:devernay,项目名称:ramen-1,代码行数:10,代码来源:pool_allocator.hpp

示例11: RAMEN_ASSERT

T *aligned_ptr( T *p, int alignment)
{
	RAMEN_ASSERT( (( alignment - 1) & alignment) == 0);

    uintptr_t ptr = reinterpret_cast<uintptr_t>( p);
    uintptr_t align = alignment - 1;
    uintptr_t aligned = ( ptr + align + 1) & ~align;

    return reinterpret_cast<unsigned char *>( aligned);
}
开发者ID:JohanAberg,项目名称:Ramen,代码行数:10,代码来源:util.hpp

示例12: manipulator_t

quad_manipulator_t::quad_manipulator_t( float2_param_t *topleft, float2_param_t *topright,
										float2_param_t *botleft, float2_param_t *botright) : manipulator_t()
{
	RAMEN_ASSERT( topleft && topright && botleft && botright);
	topleft_ = topleft;
	topright_ = topright;
	botleft_ = botleft;
	botright_ = botright;
	picked_corner_ = -1;
}
开发者ID:JohanAberg,项目名称:Ramen,代码行数:10,代码来源:quad_manipulator.cpp

示例13: do_mouse_release_event

	virtual void do_mouse_release_event( const ui::mouse_release_event_t& event)
	{
		if( event.dragged)
		{
			RAMEN_ASSERT( drag_axes_ || drag_center_);
			param_->param_set()->end_edit( param_->track_mouse());
		}

		drag_center_ = drag_axes_ = false;
		dragx_ = dragy_ = true;
	}
开发者ID:devernay,项目名称:ramen-1,代码行数:11,代码来源:move2d_node.cpp

示例14: RAMEN_ASSERT

void vertex_t::perspective_divide()
{
	RAMEN_ASSERT( screen.w != 0);

	inv_w = 1.0f / screen.w;
	screen.x *= inv_w;
	screen.y *= inv_w;

	uv.x *= inv_w;
	uv.y *= inv_w;
}
开发者ID:JohanAberg,项目名称:Ramen,代码行数:11,代码来源:vertex.cpp

示例15: sample_level

	pixel_t sample_level( int level, const vector2_t& p) const
	{
		RAMEN_ASSERT( level >= 0 && level < num_levels());

		if( level == 0)
			return top_sampler_( p);

		float s = scales_[level];
		vector2_t q( p.x * s, p.y * s);
		return samplers_[level - 1]( q);
	}
开发者ID:JohanAberg,项目名称:Ramen,代码行数:11,代码来源:mipmap_sampler.hpp


注:本文中的RAMEN_ASSERT函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。