这篇教程C++ unused函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中unused函数的典型用法代码示例。如果您正苦于以下问题:C++ unused函数的具体用法?C++ unused怎么用?C++ unused使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了unused函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: unusedvoid Translation::run(vector<string> pArgParam,string input, string output){ unused(pArgParam); ImagePNG* img = new ImagePNG(); img->load(input); double start = Data::get_time(); cout << &img << endl; translation(img,atoi(pArgParam[0].c_str()),atoi(pArgParam[1].c_str()), new Color(0,0,0,255)); if (Data::CHRONO) cout << description<<" effectue en " << 1000*(Data::get_time() - start)<<" ms"<<endl; img->save(output);}
开发者ID:hoboris,项目名称:Imagical,代码行数:10,
示例2: unusedint WINAPI WinMain (HINSTANCE hInstance ,HINSTANCE hPrevInstance ,LPSTR lpCmdLine ,int nCmdShow )#endif // LMI_MSW defined.{ // (Historical notes.) Using wx-2.5.1 and mpatrol-1.4.8, both // dynamically linked to this application built with gcc-3.2.3, // three memory leaks are reported with: // MPATROL_OPTIONS='SHOWUNFREED' // It's easier to trace them with: // MPATROL_OPTIONS='LOGALL SHOWUNFREED USEDEBUG' // Two are apparently mpatrol artifacts traceable to symbols: // [space follows leading underscores in reserved names] // "_ _ _ mp_findsource" // "_ _ _ mp_init" // The third is traceable in 'mpatrol.log' with 'USEDEBUG' to // Skeleton::GetEventHashTable() const // (although stepping through the code in gdb suggests it's really // WinMain(), and mpatrol or libbfd just got the symbol wrong) // and seems to be triggered the first time the program allocates // memory. The next line forces that to occur here; otherwise, // tracing this 'leak' becomes cumbersome and mysterious. std::string unused("Seems to trigger initialization of something."); int result = EXIT_FAILURE; try { initialize_application(); initialize_filesystem();#ifndef LMI_MSW result = wxEntry(argc, argv);#else // LMI_MSW defined. result = wxEntry(hInstance, hPrevInstance, lpCmdLine, nCmdShow);#endif // LMI_MSW defined. } catch(...) { try { report_exception(); } catch(...) { safely_show_message("Logic error: untrapped exception."); } } fenv_validate(); return result;}
开发者ID:vadz,项目名称:lmi,代码行数:55,
示例3: terraform_defaultstatic void terraform_default(struct rawmaterial *res, const region * r){#define SHIFT 70 double modifier = 1.0 + ((rng_int() % (SHIFT * 2 + 1)) - SHIFT) * ((rng_int() % (SHIFT * 2 + 1)) - SHIFT) / 10000.0; res->amount = (int)(res->amount * modifier); /* random adjustment, +/- 91% */ if (res->amount < 1) res->amount = 1; unused(r);}
开发者ID:UweKopf,项目名称:server,代码行数:11,
示例4: first/* This function drops those values in the history which are older than the specified age of the history instance. */void history::drop (void) { nr_double_t f = first (); nr_double_t l = last (); if (age > 0.0 && l - f > age) { int r, i = leftidx (); for (r = 0; i < t->getSize (); r++, i++) if (l - t->get (i) < age) break; r += unused () - 2; // keep 2 values being older than specified age if (r > 127) values->drop (r); }}
开发者ID:jonnyro,项目名称:arduino_motorcycle_gauges,代码行数:13,
示例5: drawPixelstatic void drawPixel(int mode,int x,int y,unsigned short color){ unused(mode); unsigned int pos = y * 640 + x; unsigned short _page = pos >> 16; /*! FIXME : 暂时将就下吧, !*/ if(_page != page){ page = _page; selectPlane(page << 2); } ((unsigned char *)0xa0000)[pos & 0xffff] = color;}
开发者ID:chain78,项目名称:none,代码行数:11,
示例6: ollrb_itr_set_refstatic void ollrb_itr_set_ref(iterator citr, const void* n_ref) { /* llrb does not permit to set ref, which would destroy the inner data structure. */ /* struct ollrb_itr* itr = (struct ollrb_itr*)citr; struct ollrb_node* node = NULL; dbg_assert(itr->__cast == ollrb_itr_cast); dbg_assert(itr->__current != NULL); node = container_of(itr->__current, struct ollrb_node, link); node->reference = n_ref; */ unused(citr); unused(n_ref); dbg_assert(false); return;}
开发者ID:march1896,项目名称:snev,代码行数:20,
示例7: unusedColor TimeWarpSynchronousGVTManager::sendEventUpdate(std::shared_ptr<Event>& event) { unused(event); Color color = color_.load(); if (color == Color::WHITE) { white_msg_count_++; } return color;}
开发者ID:o8r,项目名称:warped2,代码行数:11,
示例8: unusedvoid Difference::run(vector<string> pArgParam,string input, string output){ unused(pArgParam); ImagePNG* img = new ImagePNG(); img->load(input); ImagePNG* img2 = new ImagePNG(); img2->load(pArgParam[0]); double start = Data::get_time(); difference(img, img2); if (Data::CHRONO) cout << description<<" effectue en " << 1000*(Data::get_time() - start)<<" ms"<<endl; img->save(output);}
开发者ID:hoboris,项目名称:Imagical,代码行数:11,
示例9: findSubstringvector<int> findSubstring(string s, vector<string> &dict){ /* You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without any intervening characters. For example, given: S: "barfoothefoobarman" L: ["foo", "bar"] You should return the indices: [0,9]. (order does not matter). */ size_t wordLength = dict.front().length(); size_t catLength = wordLength * dict.size(); vector<int> result; if (s.length() < catLength) { return result; } unordered_map<string, int> wordCount; for (auto const& word : dict) { ++wordCount[word]; } for (auto i = begin(s); i <= prev(end(s), catLength); ++i) { unordered_map<string, int> unused(wordCount); for (auto j = i; j != next(i, catLength); j += wordLength) { auto pos = unused.find(string(j, next(j, wordLength))); if (pos == unused.end() || pos->second == 0) { break; } if (--pos->second == 0) { unused.erase(pos); } } if (unused.size() == 0) { result.push_back(distance(begin(s), i)); } } return result;}
开发者ID:cairuyuan,项目名称:Algorithm,代码行数:54,
示例10: virtual_freeinline voidvirtual_free(void *ptr, u32 size){#if PLATFORM_WINDOWS unused(size); VirtualFree((void *)ptr, 0, MEM_RELEASE);#else msync(ptr, size, MS_SYNC); munmap(ptr, size);#endif}
开发者ID:gingerBill,项目名称:LD35,代码行数:11,
示例11: pidfile_closestatic void pidfile_close(void){ if (pidfile) { if (daemon_process) { rewind(pidfile); unused(ftruncate(fileno(pidfile), (off_t)0)); } fclose(pidfile); pidfile = NULL; }}
开发者ID:driskell,项目名称:libcommon,代码行数:11,
示例12: unusedvoid Controller::update(unsigned long long timestamp, int midi_value) { unused(timestamp); switch (type) { case TYPE_LINEAR: if (midi_value > midi_midpoint) { midi_value -= midi_midpoint; value = value_midpoint + (value_max - value_midpoint) * midi_value / range_divisor_upper; } else { value = value_min + (value_midpoint - value_min) * midi_value / range_divisor_lower; } }}
开发者ID:Juippi,项目名称:ghostsyn,代码行数:12,
示例13: dylan_mm_register_threadMMError dylan_mm_register_thread(void *stackBot){ gc_teb_t gc_teb = current_gc_teb(); update_runtime_thread_count(1); zero_allocation_counter(gc_teb); unused(stackBot); return 0;}
开发者ID:Dean-Jansen,项目名称:opendylan,代码行数:12,
示例14: unusednsresultnsJSUtils::EvaluateString(JSContext* aCx, JS::SourceBufferHolder& aSrcBuf, JS::Handle<JSObject*> aScopeObject, JS::CompileOptions& aCompileOptions, void **aOffThreadToken){ EvaluateOptions options; options.setNeedResult(false); JS::RootedValue unused(aCx); return EvaluateString(aCx, aSrcBuf, aScopeObject, aCompileOptions, options, &unused, aOffThreadToken);}
开发者ID:bebef1987,项目名称:gecko-dev,代码行数:13,
示例15: QueryPerformanceFrequencyTimer::Timer(){ if (m_freq == 0.0) // m_freq not initialized yet ? { LARGE_INTEGER li; auto res = QueryPerformanceFrequency(&li); bwem_assert(res); unused(res); m_freq = li.QuadPart / 1000.0; } Reset();}
开发者ID:DataWraith,项目名称:StrategOS,代码行数:13,
示例16: file_open/** * @brief Write message to file * @copydetails ll_open_cb_t */static int file_open(const char *name, enum ll_level level, struct url *u, void **priv) { unused(name); unused(level); assert(u); if (u->username || u->password || u->hostname || u->port || !u->path || u->query || u->fragment) { return (-1); } if (!(*priv = fopen(u->path, "w"))) { return (-1); } return (0);}
开发者ID:Oleh-Kravchenko,项目名称:liblog,代码行数:27,
示例17: cooktvoid * cookt(void * data){ unused(data); while(1) { sem_wait(&cookpillow); printf("COOK %d [+%d]/n",portions,M); usleep(rand()%90+10); portions = M; //printf("READY/n"); sem_post(&shout); }}
开发者ID:shrumo,项目名称:miscellaneous,代码行数:14,
示例18: unusedvoid fractional_progress::init(stream_size_type range) { unused(range);#ifndef TPIE_NDEBUG if (m_init_called) { std::stringstream s; s << "init() was called on a fractional_progress for which init had already been called. Subindicators were:" << std::endl; s << sub_indicators_ss(); TP_LOG_FATAL(s.str()); s.str(""); tpie::backtrace(s, 5); TP_LOG_DEBUG(s.str()); TP_LOG_FLUSH_LOG; } m_init_called=true;#endif if (m_pi) m_pi->init(23000);}
开发者ID:josephwinston,项目名称:tpie,代码行数:17,
示例19: fcntl//------------------------------------------------------------------------------//!voidSocket::blocking( bool v ){#if BASE_SOCKET_USE_BSD int f = fcntl( _impl->_sock, F_GETFL, 0 ); if( v ) { fcntl( _impl->_sock, F_SETFL, f | O_NONBLOCK ); } else { fcntl( _impl->_sock, F_SETFL, f & ~O_NONBLOCK ); }#elif BASE_SOCKET_USE_WINSOCK unused(v);#else#endif}
开发者ID:LudoSapiens,项目名称:Dev,代码行数:20,
示例20: worldUpdatorAsync bool worldUpdatorAsync(uint64_t dt_nanos) { unused(dt_nanos); try { update(); } catch(const std::exception& ex) { //Utils::DebugBreak(); Utils::log(Utils::stringf("Exception occurred while updating world: %s", ex.what()), Utils::kLogLevelError); } catch(...) { //Utils::DebugBreak(); Utils::log("Exception occurred while updating world", Utils::kLogLevelError); } return true; }
开发者ID:5guo,项目名称:AirSim,代码行数:18,
示例21: lenstatic UINT __Format( OUT LPTSTR* ppOutput, OUT UINT* pLen, IN LPCTSTR format, IN va_list& args){ UINT len(0); if (format) { va_list newargs; va_copy(newargs, args); // Figure out the length. If we were given // a valid pointer that's long enough, use it // otherwise we need to reallocate it. len = VSCPRINTF(format, newargs)+1; if (len > *pLen) { // Delete the buffer ARRAY_DELETE(*ppOutput); // Resize the buffer. size_t unused(0); __Alloc(len, ppOutput, &unused); *pLen = len; } // Fill the buffer. if (*ppOutput) { SPRINTFNS(*ppOutput, *pLen, format, newargs); } } //else //{ // YOU'RE GETTING A NULL POINTER BACK! //} return len;}
开发者ID:Fahrni,项目名称:ACLLib,代码行数:43,
示例22: benchmarktemplate <size_t N, typename F> Vc_ALWAYS_INLINE void benchmark(F &&f){ TimeStampCounter tsc; auto cycles = tsc.cycles(); cycles = 0x7fffffff; for (int i = 0; i < 100; ++i) { tsc.start(); for (int j = 0; j < 10; ++j) { auto C = f(); unused(C); } tsc.stop(); cycles = std::min(cycles, tsc.cycles()); } //std::cout << cycles << " Cycles for " << N *N *(N + N - 1) << " FLOP => "; std::cout << std::setw(19) << std::setprecision(3) << double(N * N * (N + N - 1) * 10) / cycles; //<< " FLOP/cycle (" << variant << ")/n";}
开发者ID:VcDevel,项目名称:Vc,代码行数:19,
示例23: t2// To tylko test. Dzieki write mozna sprawdzic, ze rzeczywiscie// nasza skrzynka zachowuje sie tak jak powinnavoid * t2(void *data){ unused(data); char buffer[STRING_LENGTH]; sprintf(buffer,"/tSTART/n"); write(1,buffer,strlen(buffer)); sprintf(buffer,"/tPOST/n"); write(1,buffer,strlen(buffer)); cs_post("/sem"); write(1,buffer,strlen(buffer)); cs_post("/sem"); write(1,buffer,strlen(buffer)); cs_post("/sem"); write(1,buffer,strlen(buffer)); cs_post("/sem"); sprintf(buffer,"/tSTOP/n"); write(1,buffer,strlen(buffer)); return NULL;}
开发者ID:shrumo,项目名称:miscellaneous,代码行数:21,
示例24: list_close}static int list_close(URLContext *h){ struct list_mgt *mgt = h->priv_data; struct list_item *item,*item1; if(!mgt)return 0; item=mgt->item_list; if(mgt->cur_uio!=NULL) url_fclose(mgt->cur_uio); while(item!=NULL) { item1=item; item=item->next; av_free(item1); } av_free(mgt); unused(h); return 0;
开发者ID:Pivosgroup,项目名称:aml-original-linux-buildroot,代码行数:19,
示例25: list_closestatic int list_close(URLContext *h){ struct list_mgt *mgt = h->priv_data; struct list_item *item,*item1; if(!mgt)return 0; item=mgt->item_list; if(mgt->cur_uio!=NULL) url_fclose(mgt->cur_uio); while(item!=NULL) { item1=item; item=item->next; if(item->ktype == KEY_AES_128){ if(item->key_ctx){ av_free(item->key_ctx); } if(item->crypto){ if(item->crypto->aes) av_free(item->crypto->aes); av_free(item->crypto->aes); } } av_free(item1); } int i; for (i = 0; i < mgt->n_variants; i++) { struct variant *var = mgt->variants[i]; av_free(var); } av_freep(&mgt->variants); mgt->n_variants = 0; if(NULL!=mgt->prefix){ av_free(mgt->prefix); mgt->prefix = NULL; } av_free(mgt); unused(h); return 0;}
开发者ID:mazen912,项目名称:vendor_ffmpeg,代码行数:42,
示例26: t1void * t1(void * data){ unused(data); char buffer[STRING_LENGTH]; sprintf(buffer,"START/n"); write(1,buffer,strlen(buffer)); sprintf(buffer,"WAIT/n"); write(1,buffer,strlen(buffer)); cs_wait("/sem"); write(1,buffer,strlen(buffer)); cs_wait("/sem"); write(1,buffer,strlen(buffer)); cs_wait("/sem"); write(1,buffer,strlen(buffer)); cs_wait("/sem"); cs_wait("/sem"); sprintf(buffer,"STOP/n"); write(1,buffer,strlen(buffer)); return NULL;}
开发者ID:shrumo,项目名称:miscellaneous,代码行数:20,
示例27: v4c_send_stdin/* * Read STDIN and send to the bufferevent. */static void v4c_send_stdin(evutil_socket_t fd, short what, void *ctx){ struct bufferevent *bev = ctx; char data[1024]; int rc; unused(what); if (!bev) { ERR("No client connected yet."); return; } rc = read(fd, data, sizeof (data)); if (rc < 0) { ERR("read() failed (%s).", strerror(errno)); return; } data[rc] = '/0'; evbuffer_add(bufferevent_get_output(bev), data, rc);}
开发者ID:eric-ch,项目名称:v4v-socket,代码行数:23,
示例28: readAbsint readAbs(void *buf, int sectors, int drive, int track, int head, int sect){ int rc; int ret = -1; int tries; unused(sectors); tries = 0; while (tries < 5) { rc = BosDiskSectorRead(buf, 1, drive, track, head, sect); if (rc == 0) { ret = 0; break; } BosDiskReset(drive); tries++; } return (ret);}
开发者ID:anilgit90,项目名称:pdos,代码行数:21,
示例29: lockervoid ViBuffer::execute(ViFunctorParameter *data){ QMutexLocker locker(&mMutex); ViBufferStream *object = dynamic_cast<ViBufferStream*>(data); if(object != NULL) { if(object->mode() == QIODevice::ReadOnly) { --mReadStreamCount; } else if(object->mode() == QIODevice::WriteOnly) { --mWriteStreamCount; if(mWriteStreamCount == 0) { locker.unlock(); emit unused(); } } }}
开发者ID:EQ4,项目名称:Visore,代码行数:21,
示例30: unusedvoid EngineView::update_selection() { if(!ImGui::IsWindowHovered() || !ImGui::IsMouseClicked(0)) { return; } Transformable* selected = nullptr; float score = std::numeric_limits<float>::max(); for(const auto& tr : context()->scene().scene().static_meshes()) { auto [pos, rot, scale] = tr->transform().decompose(); unused(rot); float radius = tr->radius() * std::max({scale.x(), scale.y(), scale.z()}); float sc = (pos - _picked_pos).length() / radius; if(sc < score) { selected = tr.get(); score = sc; } } context()->selection().set_selected(selected);}
开发者ID:gan74,项目名称:Yave,代码行数:22,
注:本文中的unused函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ unused_arg函数代码示例 C++ untimeout函数代码示例 |