您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ FOUNDATION_UNUSED函数代码示例

51自学网 2021-06-01 20:42:54
  C++
这篇教程C++ FOUNDATION_UNUSED函数代码示例写得很实用,希望能帮到您。

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

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

示例1: _socket_stream_truncate

static void_socket_stream_truncate(stream_t* stream, size_t size) {	FOUNDATION_ASSERT(stream);	FOUNDATION_ASSERT(stream->type == STREAMTYPE_SOCKET);	FOUNDATION_UNUSED(stream);	FOUNDATION_UNUSED(size);}
开发者ID:rampantpixels,项目名称:network_lib,代码行数:7,


示例2: test_exception_handler

voidtest_exception_handler(const char* dump_file, size_t length) {	FOUNDATION_UNUSED(dump_file);	FOUNDATION_UNUSED(length);	log_error(HASH_TEST, ERROR_EXCEPTION, STRING_CONST("Test raised exception"));	process_exit(-1);}
开发者ID:rampantpixels,项目名称:task_lib,代码行数:7,


示例3: blast_reader_unmap

voidblast_reader_unmap(blast_reader_t* reader, void* buffer, uint64_t offset, int size) {    FOUNDATION_UNUSED(reader);    FOUNDATION_UNUSED(buffer);    FOUNDATION_UNUSED(offset);    FOUNDATION_UNUSED(size);}
开发者ID:harish-agr,项目名称:network_lib,代码行数:7,


示例4: test_log_handler

static voidtest_log_handler(hash_t context, error_level_t severity, const char* msg, size_t length) {	FOUNDATION_UNUSED(context);	FOUNDATION_UNUSED(severity);	if (_test_should_terminate)		return;#if FOUNDATION_PLATFORM_IOS	test_text_view_append(delegate_uiwindow(), 1 , msg, length);#elif FOUNDATION_PLATFORM_ANDROID	jclass _test_log_class = 0;	jmethodID _test_log_append = 0;	const struct JNINativeInterface** jnienv = thread_attach_jvm();	_test_log_class = (*jnienv)->GetObjectClass(jnienv, android_app()->activity->clazz);	if (_test_log_class)		_test_log_append = (*jnienv)->GetMethodID(jnienv, _test_log_class, "appendLog",		                                          "(Ljava/lang/String;)V");	if (_test_log_append) {		jstring jstr = (*jnienv)->NewStringUTF(jnienv, msg);		(*jnienv)->CallVoidMethod(jnienv, android_app()->activity->clazz, _test_log_append, jstr);		(*jnienv)->DeleteLocalRef(jnienv, jstr);	}	thread_detach_jvm();	FOUNDATION_UNUSED(length);#endif}
开发者ID:rampantpixels,项目名称:task_lib,代码行数:27,


示例5: _stream_open_stdin

static stream_t*_stream_open_stdin(const char* path, size_t length, unsigned int mode) {	FOUNDATION_UNUSED(path);	FOUNDATION_UNUSED(length);	stream_t* stream = stream_open_stdin();	stream->mode = (mode & STREAM_BINARY) | STREAM_IN;	return stream;}
开发者ID:haifenghuang,项目名称:foundation_lib,代码行数:8,


示例6: handle_log

static voidhandle_log(hash_t context, error_level_t severity, const char* msg, size_t msg_length) {    FOUNDATION_UNUSED(context);    FOUNDATION_UNUSED(severity);    string_copy(handled_log, sizeof(handled_log), msg, msg_length);    if (_global_log_handler)        _global_log_handler(context, severity, msg, msg_length);}
开发者ID:rampantpixels,项目名称:foundation_lib,代码行数:8,


示例7: test_local_exception_handler

static voidtest_local_exception_handler(const char* dump_path, size_t length) {    FOUNDATION_UNUSED(dump_path);#if !BUILD_ENABLE_LOG    FOUNDATION_UNUSED(length);#endif    log_infof(HASH_TEST, STRING_CONST("Exception handler called: %.*s"), (int)length, dump_path);    _exception_handler_called = true;}
开发者ID:rampantpixels,项目名称:foundation_lib,代码行数:9,


示例8: test_log_handler

static voidtest_log_handler(hash_t context, error_level_t severity, const char* msg, size_t length) {	FOUNDATION_UNUSED(context);	FOUNDATION_UNUSED(severity);	if (_test_should_terminate)		return;	if (!log_stdout())		return;	test_log_view_append(msg, length);}
开发者ID:rampantpixels,项目名称:foundation_lib,代码行数:10,


示例9: test_exception_handler

voidtest_exception_handler(const char* dump_file, size_t length) {	FOUNDATION_UNUSED(dump_file);	FOUNDATION_UNUSED(length);	log_error(HASH_TEST, ERROR_EXCEPTION, STRING_CONST("Test raised exception"));#if (FOUNDATION_PLATFORM_IOS || FOUNDATION_PLATFORM_ANDROID) && !BUILD_ENABLE_LOG	test_log_view_append(STRING_CONST("Test raised exception/n"));	thread_sleep(5000);#endif	process_exit(-1);}
开发者ID:rampantpixels,项目名称:foundation_lib,代码行数:11,


示例10: process_set_verb

voidprocess_set_verb(process_t* proc, const char* verb, size_t length) {#if FOUNDATION_PLATFORM_WINDOWS	if (proc->verb.length <= length)		proc->verb = string_resize(proc->verb.str, proc->verb.length,		                           proc->verb.length ? proc->verb.length + 1 : 0, length + 1, 0);	proc->verb = string_copy(proc->verb.str, length + 1, verb, length);#else	FOUNDATION_UNUSED(proc);	FOUNDATION_UNUSED(verb);	FOUNDATION_UNUSED(length);#endif}
开发者ID:haifenghuang,项目名称:foundation_lib,代码行数:13,


示例11: main_run

int main_run( void* main_arg ){	FOUNDATION_UNUSED( main_arg );	log_set_suppress( HASH_TEST, ERRORLEVEL_DEBUG );	return test_run_all();}
开发者ID:emoon,项目名称:foundation_lib,代码行数:7,


示例12: blast_client_process_ack

static intblast_client_process_ack(blast_client_t* client, uint32_t* seq, tick_t timestamp) {	int ipend, psize;	int iack, asize;	for (iack = 0, asize = PACKET_ACK_COUNT; iack < asize; ++iack) {		for (ipend = 0, psize = array_size(client->pending); ipend < psize; ++ipend) {			if (client->pending[ipend].seq == seq[iack]) {				array_erase(client->pending, ipend);				break;			}		}	}	FOUNDATION_UNUSED(timestamp);	/*log_infof( HASH_BLAST, "ACK processed, %d pending packets remaining (ack seq %d)", array_size( client->pending ), seq[0] );	if( array_size( client->pending ) )	{		char* buf = 0;		for( ipend = 0, psize = array_size( client->pending ); ipend < psize; ++ipend )		{			buf = string_append( buf, string_from_uint_static( client->pending[ipend].seq, false, 0, 0 ) );			buf = string_append( buf, " " );		}		log_infof( HASH_BLAST, "  %s", buf );		string_deallocate( buf );	}*/	return 0;}
开发者ID:harish-agr,项目名称:network_lib,代码行数:29,


示例13: _socket_stream_size

static size_t_socket_stream_size(stream_t* stream) {	FOUNDATION_ASSERT(stream);	FOUNDATION_ASSERT(stream->type == STREAMTYPE_SOCKET);	FOUNDATION_UNUSED(stream);	return 0;}
开发者ID:rampantpixels,项目名称:network_lib,代码行数:7,


示例14: test_event_thread

static void* test_event_thread( object_t thread, void* arg ){	event_block_t* block;	event_t* event = 0;	FOUNDATION_UNUSED( arg );	while( !thread_should_terminate( thread ) )	{		block = event_stream_process( system_event_stream() );		event = 0;		while( ( event = event_next( block, event ) ) )		{			switch( event->id )			{				case FOUNDATIONEVENT_TERMINATE:					log_warn( HASH_TEST, WARNING_SUSPICIOUS, "Terminating test due to event" );					process_exit( -2 );					break;				default:					break;			}		}		thread_sleep( 10 );	}	return 0;}
开发者ID:emoon,项目名称:foundation_lib,代码行数:29,


示例15: window_module_initialize

intwindow_module_initialize(const window_config_t config) {	FOUNDATION_UNUSED(config);	if (_window_initialized)		return 0;	if (_window_event_initialize() < 0)		return -1;	_window_initialized = true;#if FOUNDATION_PLATFORM_MACOS || FOUNDATION_PLATFORM_IOS	_window_class_reference();#endif#if FOUNDATION_PLATFORM_IOS	_window_native_initialize();#endif#if FOUNDATION_PLATFORM_LINUX	XSetErrorHandler(_x11_error_handler);#endif	return 0;}
开发者ID:rampantpixels,项目名称:window_lib,代码行数:25,


示例16: raise_abort

static intraise_abort(void* arg) {    FOUNDATION_UNUSED(arg);    exception_raise_abort();#if !FOUNDATION_COMPILER_CLANG    return 1;#endif}
开发者ID:rampantpixels,项目名称:foundation_lib,代码行数:8,


示例17: WinMain

int STDCALLWinMain(HINSTANCE instance, HINSTANCE previnst, LPSTR cline, int cmd_show) {	int ret;	FOUNDATION_UNUSED(instance);	FOUNDATION_UNUSED(previnst);	FOUNDATION_UNUSED(cline);	FOUNDATION_UNUSED(cmd_show);	if (main_initialize() < 0)		return -1;	SetConsoleCtrlHandler(_main_console_handler, TRUE);	thread_set_main();	foundation_startup();	system_post_event(FOUNDATIONEVENT_START);#if BUILD_DEBUG	ret = main_run(0);#else	{		string_t name;		const application_t* app = environment_application();		string_const_t aname = app->short_name;		string_const_t vstr = string_from_version_static(app->version);		name = string_allocate_concat_varg(			aname.length ? aname.str : "unknown", aname.length ? aname.length : 7,			STRING_CONST("-"),			STRING_CONST(vstr));		if (app->dump_callback)			crash_guard_set(app->dump_callback, STRING_ARGS(name));		ret = crash_guard(main_run, 0, app->dump_callback, STRING_ARGS(name));		string_deallocate(name.str);	}#endif	main_finalize();	return ret;}
开发者ID:haifenghuang,项目名称:foundation_lib,代码行数:46,


示例18: _profile_stream_thread

static void*_profile_stream_thread(void* arg) {	FOUNDATION_UNUSED(arg);	thread_yield();	while (!thread_try_wait(4)) {		profile_log(STRING_CONST("Thread message"));		profile_begin_block(STRING_CONST("Thread block"));		{			profile_update_block();			profile_begin_block(STRING_CONST("Thread subblock"));			{				profile_log(STRING_CONST("Sub message"));				profile_trylock(STRING_CONST("Trylock"));				profile_lock(STRING_CONST("Trylock"));				profile_wait(STRING_CONST("Wait"));				profile_signal(STRING_CONST("Signal"));				thread_sleep(2);				profile_unlock(STRING_CONST("Trylock"));				profile_log(STRING_CONST("End sub"));			}			profile_end_block();			profile_begin_block(STRING_CONST("Thread second subblock"));			{				profile_update_block();				profile_begin_block(STRING_CONST("Thread subblock"));				{				}				profile_end_block();			}			profile_end_block();			profile_trylock(STRING_CONST("Trylock"));			thread_sleep(1);			profile_lock(STRING_CONST("Trylock"));			thread_sleep(4);			profile_unlock(STRING_CONST("Trylock"));		}		profile_end_block();		atomic_add64(&_profile_generated_blocks, 14);	}	return 0;}
开发者ID:rampantpixels,项目名称:foundation_lib,代码行数:56,


示例19: test_profile_initialize

static int test_profile_initialize( void ){	profile_set_output( test_profile_output );	_test_profile_buffer = memory_allocate( 0, TEST_PROFILE_BUFFER_SIZE, 0, MEMORY_PERSISTENT );	FOUNDATION_UNUSED( _test_profile_buffer_size );	return 0;}
开发者ID:emoon,项目名称:foundation_lib,代码行数:10,


示例20: _memory_allocate_malloc

static void*_memory_allocate_malloc(hash_t context, size_t size, unsigned  int align, unsigned int hint) {	void* block;	FOUNDATION_UNUSED(context);	align = _memory_get_align(align);	block = _memory_allocate_malloc_raw(size, align, hint);	if (block && (hint & MEMORY_ZERO_INITIALIZED))		memset(block, 0, (size_t)size);	return block;}
开发者ID:haifenghuang,项目名称:foundation_lib,代码行数:10,


示例21: mutex_thread

static void* mutex_thread( object_t thread, void* arg ){	mutex_t* mutex = arg;	int i;	FOUNDATION_UNUSED( thread );	FOUNDATION_UNUSED( arg );	for( i = 0; i < 128; ++i )	{		if( !mutex_try_lock( mutex ) )			mutex_lock( mutex );		++thread_counter;		mutex_unlock( mutex );	}	return 0;}
开发者ID:emoon,项目名称:foundation_lib,代码行数:19,


示例22: process_set_verb

void process_set_verb( process_t* proc, const char* verb ){	if( !proc )		return;#if FOUNDATION_PLATFORM_WINDOWS	string_deallocate( proc->verb );	proc->verb = string_clone( verb );#else	FOUNDATION_UNUSED( verb );#endif}
开发者ID:HardlyHaki,项目名称:ProDBG,代码行数:11,


示例23: blast_client_congest_control

static intblast_client_congest_control(blast_client_t* client, tick_t current) {	static float64_t mbps = 20.0;	static tick_t last_ts = 0;	static float64_t dt = 0.1;	if (last_ts)		dt = time_ticks_to_seconds(time_diff(last_ts, current));	float64_t kbytes = (mbps * 1024.0) * dt;	FOUNDATION_UNUSED(client);	return (int)(1024.0 * (kbytes / (float64_t)PACKET_CHUNK_SIZE));}
开发者ID:harish-agr,项目名称:network_lib,代码行数:11,


示例24: _profile_io

static void* _profile_io( object_t thread, void* arg ){	unsigned int system_info_counter = 0;	profile_block_t system_info;	FOUNDATION_UNUSED( arg );	memset( &system_info, 0, sizeof( profile_block_t ) );	system_info.data.id = PROFILE_ID_SYSTEMINFO;	system_info.data.start = time_ticks_per_second();	string_copy( system_info.data.name, "sysinfo", 7 );	while( !thread_should_terminate( thread ) )	{		thread_sleep( _profile_wait );		if( !atomic_load32( &_profile_root ) )			continue;		profile_begin_block( "profile_io" );		if( atomic_load32( &_profile_root ) )		{			profile_begin_block( "process" );			//This is thread safe in the sense that only completely closed and ended			//blocks will be put as children to root block, so no additional blocks			//will ever be added to child subtrees while we process it here			_profile_process_root_block();			profile_end_block();		}		if( system_info_counter++ > 10 )		{			if( _profile_write )				_profile_write( &system_info, sizeof( profile_block_t ) );			system_info_counter = 0;		}		profile_end_block();	}	if( atomic_load32( &_profile_root ) )		_profile_process_root_block();	if( _profile_write )	{		profile_block_t terminate;		memset( &terminate, 0, sizeof( profile_block_t ) );		terminate.data.id = PROFILE_ID_ENDOFSTREAM;		_profile_write( &terminate, sizeof( profile_block_t ) );	}	return 0;}
开发者ID:HardlyHaki,项目名称:ProDBG,代码行数:54,


示例25: thread_wait

static void* thread_wait( object_t thread, void* arg ){	mutex_t* mutex = arg;	FOUNDATION_UNUSED( thread );	FOUNDATION_UNUSED( arg );	atomic_incr32( &thread_waiting );	if( mutex_wait( mutex, 30000 ) )	{		atomic_incr32( &thread_waited );		mutex_unlock( mutex );	}	else	{		log_warn( HASH_TEST, WARNING_SUSPICIOUS, "Thread timeout" );	}	return 0;}
开发者ID:emoon,项目名称:foundation_lib,代码行数:20,


示例26: uuid_thread_time

static void* uuid_thread_time( object_t thread, void* arg ){	int i;	int ithread = (int)(uintptr_t)arg;	FOUNDATION_UNUSED( thread );	for( i = 0; i < 8192; ++i )		uuid_thread_store[ithread][i] = uuid_generate_time();	return 0;}
开发者ID:emoon,项目名称:foundation_lib,代码行数:11,


示例27: event_thread

static void* event_thread( object_t thread, void* arg ){	event_block_t* block;	event_t* event = 0;	FOUNDATION_UNUSED( arg );	while( !thread_should_terminate( thread ) )	{		block = event_stream_process( system_event_stream() );		event = 0;		while( ( event = event_next( block, event ) ) )		{			switch( event->id )			{				case FOUNDATIONEVENT_START:#if FOUNDATION_PLATFORM_IOS || FOUNDATION_PLATFORM_ANDROID					log_debug( HASH_TEST, "Application start event received" );					_test_should_start = true;#endif					break;				case FOUNDATIONEVENT_TERMINATE:#if FOUNDATION_PLATFORM_IOS || FOUNDATION_PLATFORM_ANDROID					log_debug( HASH_TEST, "Application stop/terminate event received" );					_test_should_terminate = true;#else					log_warn( HASH_TEST, WARNING_SUSPICIOUS, "Terminating tests due to event" );					process_exit( -2 );#endif					break;				case FOUNDATIONEVENT_FOCUS_GAIN:					_test_have_focus = true;					break;				case FOUNDATIONEVENT_FOCUS_LOST:					_test_have_focus = false;					break;				default:					break;			}		}		thread_sleep( 10 );	}	log_debug( HASH_TEST, "Application event thread exiting" );	return 0;}
开发者ID:milzod,项目名称:foundation_lib,代码行数:52,



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


C++ FP函数代码示例
C++ FOUNDATION_ASSERT函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。