commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
78d0273a132fc9a532c107c4fcf3085101acb939 | source/aboutwindow.cpp | source/aboutwindow.cpp | #include "aboutwindow.h"
#include "ui_aboutwindow.h"
aboutWindow::aboutWindow(QString version, QWidget *parent) : QDialog(parent), ui(new Ui::aboutWindow)
{
ui->setupUi(this);
ui->labelCurrent->setText(version);
m_version = version.replace(".", "").toInt();
QNetworkAccessManager *m = new QNetwor... | #include "aboutwindow.h"
#include "ui_aboutwindow.h"
aboutWindow::aboutWindow(QString version, QWidget *parent) : QDialog(parent), ui(new Ui::aboutWindow)
{
ui->setupUi(this);
ui->labelCurrent->setText(version);
m_version = version.replace(".", "").toInt();
QNetworkAccessManager *m = new QNetwor... | Fix last version writing in aboutWindow | Fix last version writing in aboutWindow | C++ | apache-2.0 | Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,YoukaiCat/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,YoukaiCat/imgbrd-grabber |
8f9c6f062ee9e0046cc799014b74a64102b73bfc | src/enfa_graph.cpp | src/enfa_graph.cpp | #include "enfa.h"
#include <string>
namespace tinygrep {
namespace enfa {
std::string EpsilonNFA::to_graph() const {
return "";
}
} // namespace enfa
} // namespace tinygrep
| #include "enfa.h"
#include <string>
#include <sstream>
namespace tinygrep {
namespace enfa {
// The default scale of a generated graph.
const unsigned int DEFAULT_PNG_SIZE = 10;
const std::string LABEL_BEGIN = " [label=\"",
LABEL_END = "\"]",
EDGE_ARROW = " -> ",
... | Complete function for parsing epsilon-NFA -> .gv file. | Complete function for parsing epsilon-NFA -> .gv file.
| C++ | mit | grawies/tiny-grep,samuelz/tiny-grep |
f6d14e99f2f8aa192bad0fb465ce51c38eae0610 | tests/llvmTest.cpp | tests/llvmTest.cpp | #include <gtest/gtest.h>
#include <rapidxml_utils.hpp>
#include "llvm/compiler.hpp"
#include "parser/xmlParser.hpp"
class LLVMCompilerTest: public ::testing::Test {
protected:
XMLParser xpx = XMLParser();
inline rapidxml::file<> xmlFile(std::string path) {
#define Q(x) #x
#define QUOTE(x) Q(x)
path... | #include <gtest/gtest.h>
#include <rapidxml_utils.hpp>
#include "llvm/compiler.hpp"
#include "parser/xmlParser.hpp"
class LLVMCompilerTest: public ::testing::Test {
protected:
XMLParser xpx = XMLParser();
inline rapidxml::file<> xmlFile(std::string path) {
path = DATA_PARENT_DIR + ("/" + path);
return ... | Revert "Fixed command line macro's missing quotes" | Revert "Fixed command line macro's missing quotes"
This reverts commit 6c97b96c36b8a0d526a8fc543514f4dea33243b4.
| C++ | mit | slak44/test-lang,slak44/Xylene |
ed8e6fa1e2feedbd7bbbaee1b2ebade309b85436 | src/Homie/Timer.cpp | src/Homie/Timer.cpp | #include "Timer.hpp"
using namespace HomieInternals;
Timer::Timer()
: _initialTime(0)
, _interval(0)
, _tickAtBeginning(false) {
}
void Timer::setInterval(uint32_t interval, bool tickAtBeginning) {
_interval = interval;
_tickAtBeginning = tickAtBeginning;
this->reset();
}
bool Timer::check() const {
if (_t... | #include "Timer.hpp"
using namespace HomieInternals;
Timer::Timer()
: _initialTime(0)
, _interval(0)
, _tickAtBeginning(false) {
}
void Timer::setInterval(uint32_t interval, bool tickAtBeginning) {
_interval = interval;
_tickAtBeginning = tickAtBeginning;
this->reset();
}
bool Timer::check() const {
if (_t... | Add missing underscore - fix last commit | :bug: Add missing underscore - fix last commit
| C++ | mit | marvinroger/homie-esp8266,euphi/homie-esp8266,marvinroger/homie-esp8266,marvinroger/homie-esp8266,euphi/homie-esp8266,marvinroger/homie-esp8266,euphi/homie-esp8266,euphi/homie-esp8266 |
871b1650b7128f6de509c3f4e20ac9cd6b48728b | src/builtin_functions/range.cpp | src/builtin_functions/range.cpp | // Copyright (c) 2007-2009 Paul Hodge. All rights reserved.
#include "circa.h"
namespace circa {
namespace range_function {
void evaluate(Term* caller)
{
unsigned int max = as_int(caller->input(0));
Branch& branch = as_branch(caller);
resize_list(branch, max, INT_TYPE);
... | // Copyright (c) 2007-2009 Paul Hodge. All rights reserved.
#include "circa.h"
namespace circa {
namespace range_function {
void evaluate(Term* caller)
{
int max = as_int(caller->input(0));
Branch& branch = as_branch(caller);
resize_list(branch, max, INT_TYPE);
... | Fix a compile error on msvc7 | Fix a compile error on msvc7
| C++ | mit | andyfischer/circa,andyfischer/circa,andyfischer/circa,andyfischer/circa |
da974c767ace23fb91a8b5a510e88a2bf0b6b99f | src/box2dbaseitem.cpp | src/box2dbaseitem.cpp | #include "box2dbaseitem.h"
#include <Box2D/Box2D.h>
float Box2DBaseItem::m_scaleRatio = 32.0f;
Box2DBaseItem::Box2DBaseItem(GameScene *parent )
: GameItem(parent)
, m_initialized(false)
, m_synchronizing(false)
, m_synchronize(true)
{
}
bool Box2DBaseItem::initialized() const
{
return m_initiali... | #include "box2dbaseitem.h"
#include "util.h"
#include <Box2D/Box2D.h>
float Box2DBaseItem::m_scaleRatio = 32.0f;
Box2DBaseItem::Box2DBaseItem(GameScene *parent )
: GameItem(parent)
, m_initialized(false)
, m_synchronizing(false)
, m_synchronize(true)
{
}
bool Box2DBaseItem::initialized() const
{
... | Use helper function to get top left coordinates | Use helper function to get top left coordinates
| C++ | mit | paulovap/Bacon2D,kenvandine/Bacon2D,arcrowel/Bacon2D,kenvandine/Bacon2D,arcrowel/Bacon2D,paulovap/Bacon2D |
4a9474a1f62118059152d215dcca05f528601f16 | server/managers/MediaSessionManager.cpp | server/managers/MediaSessionManager.cpp | #include "MediaSessionManager.h"
using namespace ::com::kurento::kms;
using namespace ::com::kurento::kms::api;
void task() {
}
MediaSessionManager::MediaSessionManager() {
}
MediaSessionManager::~MediaSessionManager() {
}
MediaSessionManager *MediaSessionManager::getInstance() {
static shared_ptr<MediaSessionMan... | #include "MediaSessionManager.h"
using namespace ::com::kurento::kms;
using namespace ::com::kurento::kms::api;
void task() {
}
MediaSessionManager::MediaSessionManager() {
}
MediaSessionManager::~MediaSessionManager() {
}
MediaSessionManager *MediaSessionManager::getInstance() {
static MediaSessionManager *insta... | Use a pointer in getInstance instead of shared_ptr | Use a pointer in getInstance instead of shared_ptr
| C++ | lgpl-2.1 | lulufei/kurento-media-server,mparis/kurento-media-server,todotobe1/kurento-media-server,lulufei/kurento-media-server,mparis/kurento-media-server,shelsonjava/kurento-media-server,shelsonjava/kurento-media-server,TribeMedia/kurento-media-server,Kurento/kurento-media-server,todotobe1/kurento-media-server,Kurento/kurento-m... |
fa6aa5bc914f044100d9034541c0345c3cde3d0e | tests/test_case.cc | tests/test_case.cc | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ppapi/tests/test_case.h"
#include <sstream>
std::string TestCase::MakeFailureMessage(const char* file,
... | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ppapi/tests/test_case.h"
#include <sstream>
std::string TestCase::MakeFailureMessage(const char* file,
... | Fix the Chrome Linux build by working around a compiler bug. | Fix the Chrome Linux build by working around a compiler bug.
TEST=none
BUG=none | C++ | bsd-3-clause | tiaolong/ppapi,whitewolfm/ppapi,phisixersai/ppapi,ruder/ppapi,siweilvxing/ppapi,nanox/ppapi,cacpssl/ppapi,lag945/ppapi,c1soju96/ppapi,fubaydullaev/ppapi,CharlesHuimin/ppapi,YachaoLiu/ppapi,JustRight/ppapi,YachaoLiu/ppapi,cacpssl/ppapi,YachaoLiu/ppapi,lag945/ppapi,stefanie924/ppapi,dralves/ppapi,rise-worlds/ppapi,ruder/... |
a97b09cca0d7b87fcd92959817bf8123cd0aa3ef | src/ox/std/strops.cpp | src/ox/std/strops.cpp | /*
* Copyright 2015 - 2016 gtalent2@gmail.com
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "strops.hpp"
int ox_strcmp(const char *str1, const ch... | /*
* Copyright 2015 - 2016 gtalent2@gmail.com
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "strops.hpp"
int ox_strcmp(const char *str1, const ch... | Fix warning concering always true check | Fix warning concering always true check
| C++ | mpl-2.0 | wombatant/wfs,wombatant/memphis,wombatant/wfs,wombatant/ox,wombatant/ox |
cc7a068320fa0493468adccc2f634394c667a370 | source/ed/osm2ed_main.cpp | source/ed/osm2ed_main.cpp | /* Copyright © 2001-2018, Canal TP and/or its affiliates. All rights reserved.
This file is part of Navitia,
the software to build cool stuff with public transport.
Hope you'll enjoy and contribute to this project,
powered by Canal TP (www.canaltp.fr).
Help us simplify mobility and open public transport:
... | /* Copyright © 2001-2018, Canal TP and/or its affiliates. All rights reserved.
This file is part of Navitia,
the software to build cool stuff with public transport.
Hope you'll enjoy and contribute to this project,
powered by Canal TP (www.canaltp.fr).
Help us simplify mobility and open public transport:
... | Add new line at the end of file | Add new line at the end of file
| C++ | agpl-3.0 | kinnou02/navitia,kadhikari/navitia,kadhikari/navitia,xlqian/navitia,Tisseo/navitia,CanalTP/navitia,kinnou02/navitia,patochectp/navitia,kinnou02/navitia,kadhikari/navitia,CanalTP/navitia,pbougue/navitia,patochectp/navitia,Tisseo/navitia,Tisseo/navitia,CanalTP/navitia,CanalTP/navitia,xlqian/navitia,xlqian/navitia,xlqian/... |
d9fc39d858ef413ee57507434b47ac4ecb62198c | main.cpp | main.cpp | #include <QApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <stdlib.h>
#include <QtGlobal>
int main(int argc, char *argv[])
{
//TODO: Run this on Qt versions which support it...
//QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv... | #include <QApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <stdlib.h>
#include <QtGlobal>
int main(int argc, char *argv[])
{
//TODO: Run this on Qt versions which support it...
//QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv... | Use putenv for env variables | Use putenv for env variables
| C++ | bsd-2-clause | Yubico/yubikey-manager-qt,Yubico/yubikey-manager-qt,Yubico/yubikey-manager-qt,Yubico/yubikey-manager-qt |
bfe62221570c9e9d281d0bb095b3867773eacfb9 | zg01/zg01_fsm.cpp | zg01/zg01_fsm.cpp | #include "zg01_fsm.h"
// max time between ZG01 bits, until a new frame is assumed to have started
#define ZG01_MAX_MS 3
// all of the state of the FSM
typedef struct {
uint8_t *buffer;
int num_bits;
unsigned long prev_ms;
} fsm_t;
static fsm_t fsm;
static fsm_t *s = &fsm;
// resets the FSM
static void ... | #include "zg01_fsm.h"
// max time between ZG01 bits, until a new frame is assumed to have started
#define ZG01_MAX_MS 2
// all of the state of the FSM
typedef struct {
uint8_t *buffer;
int num_bits;
unsigned long prev_ms;
} fsm_t;
static fsm_t fsm;
static fsm_t *s = &fsm;
// resets the FSM
static void ... | Set new frame timeout to 2 milliseconds (was 3 milliseconds) | Set new frame timeout to 2 milliseconds (was 3 milliseconds)
| C++ | mit | revspace/co2sensor,revspace/co2sensor,vvzvlad/co2sensor_esp8266,vvzvlad/co2sensor_esp8266 |
532594a4c5585f457b936a23567376f8ac5112cf | Editor/locale/locale.cpp | Editor/locale/locale.cpp | #include "locale.hpp"
#include <cstring>
#include <clocale>
#include <algorithm>
#undef min
#undef max
namespace locale {
std::vector<std::pair<std::string_view, std::string_view>> ListLocales() {
std::vector<std::pair<std::string_view, std::string_view>> ret;
ret.reserve(std::size_t(ELocale::MAXLocale));
for ... | #include "locale.hpp"
#include <cstring>
#include <clocale>
#include <algorithm>
#undef min
#undef max
namespace locale {
std::vector<std::pair<std::string_view, std::string_view>> ListLocales() {
std::vector<std::pair<std::string_view, std::string_view>> ret;
ret.reserve(std::size_t(ELocale::MAXLocale));
for ... | Switch to string compare operator | Switch to string compare operator
| C++ | mit | AxioDL/PathShagged,AxioDL/PathShagged,AxioDL/PathShagged |
b6c55b1f8c5c6f0fffe9816026da0741efeb9ac1 | FSE/AssetLoader.cpp | FSE/AssetLoader.cpp | #include "AssetLoader.h"
namespace fse
{
AssetLoader::AssetLoader() {
}
AssetLoader::~AssetLoader()
{
}
sf::Texture& AssetLoader::getTexture(std::string path)
{
if (textureMap.count(path)) //Texture is already loaded
{
textureCounter[path]++;
}
else
{
loadTexture(path);
}
return textureM... | #include "AssetLoader.h"
namespace fse
{
AssetLoader::AssetLoader() {
}
AssetLoader::~AssetLoader()
{
}
sf::Texture& AssetLoader::getTexture(std::string path)
{
if (textureMap.count(path)) //Texture is already loaded
{
textureCounter[path]++;
}
else
{
loadTexture(path);
}
return textureM... | Fix Assetloader not cleaning up properly | Fix Assetloader not cleaning up properly
| C++ | mit | Alia5/FSE,Alia5/FSE,Alia5/FSE,Alia5/FSE,Alia5/FSE,Alia5/FSE,Alia5/FSE,Alia5/FSE |
88281950eed0e9fadba9d13fc68707068b5b5628 | media/base/run_all_unittests.cc | media/base/run_all_unittests.cc | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/test/test_suite.h"
#include "media/base/media.h"
class TestSuiteNoAtExit : public base::TestSuite {
public:
TestSuiteNoAtExit(int a... | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/test/main_hook.h"
#include "base/test/test_suite.h"
#include "media/base/media.h"
class TestSuiteNoAtExit : public base::TestSuite {
... | Add MainHook to media unittests. | Add MainHook to media unittests.
MainHooks are in particular used on iOS to prevent the system from killing the
test application at startup.
See https://chromiumcodereview.appspot.com/10690161/ for more context.
BUG=b/6754065
Review URL: https://chromiumcodereview.appspot.com/10915061
git-svn-id: de016e52bd170d2d... | C++ | bsd-3-clause | M4sse/chromium.src,hgl888/chromium-crosswalk,dednal/chromium.src,axinging/chromium-crosswalk,jaruba/chromium.src,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,... |
3cb3a8b7fa89f25276270ad2fba51af8e3e08e00 | test/asan/TestCases/Linux/print_memory_profile_test.cc | test/asan/TestCases/Linux/print_memory_profile_test.cc | // RUN: %clangxx_asan %s -o %t
// RUN: %t 2>&1 | FileCheck %s
#include <sanitizer/common_interface_defs.h>
#include <stdio.h>
char *sink[1000];
int main() {
int idx = 0;
for (int i = 0; i < 17; i++)
sink[idx++] = new char[131];
for (int i = 0; i < 42; i++)
sink[idx++] = new char[24];
__sanitizer_pri... | // Printing memory profiling only works in the configuration where we can
// detect leaks.
// REQUIRES: leak-detection
//
// RUN: %clangxx_asan %s -o %t
// RUN: %run %t 2>&1 | FileCheck %s
#include <sanitizer/common_interface_defs.h>
#include <stdio.h>
char *sink[1000];
int main() {
int idx = 0;
for (int i = 0; ... | Fix the test for printing the memory profile. This fuctionality is only available along side the leak checking, so use the REQUIRES for that. | Fix the test for printing the memory profile. This fuctionality is only
available along side the leak checking, so use the REQUIRES for that.
Also, use %run as other tests do when launching the built binary.
This fixes check-asan for me on Linux and looks like it should fix the
linux sanitizer bots as well.
git-svn-... | C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
0c6dcbb23b935f3dedddd0d90d81649e9bdd1a30 | test/C++Frontend/2007-05-23-TryFinally.cpp | test/C++Frontend/2007-05-23-TryFinally.cpp | // RUN: %llvmgxx %s -S -emit-llvm -O2 -o - | ignore grep _Unwind_Resume | \
// RUN: wc -l | grep {\[02\]}
struct One { };
struct Two { };
void handle_unexpected () {
try
{
throw;
}
catch (One &)
{
throw Two ();
}
}
| // RUN: %llvmgxx %s -S -emit-llvm -O2 -o - | ignore grep _Unwind_Resume | \
// RUN: wc -l | grep {\[23\]}
struct One { };
struct Two { };
void handle_unexpected () {
try
{
throw;
}
catch (One &)
{
throw Two ();
}
}
| Fix this test for gcc-4.2. | Fix this test for gcc-4.2.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@41187 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | bsd-2-clause | dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,dsl... |
0a1a61a8c22586af89812621ce43608e7a3741d9 | plugins/transferui/transfersaction.cpp | plugins/transferui/transfersaction.cpp | /*
* The MIT License (MIT)
*
* Copyright (c) 2017 Nathan Osman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use,... | /*
* The MIT License (MIT)
*
* Copyright (c) 2017 Nathan Osman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use,... | Fix (another) compilation bug on MSVC. | Fix (another) compilation bug on MSVC.
| C++ | mit | nitroshare/nitroshare-desktop,nitroshare/nitroshare-desktop,nitroshare/nitroshare-desktop,nitroshare/nitroshare-desktop |
7594fda18ebb96f516aefe1665a46650c7082f08 | src/detail/FrequencyMap.cpp | src/detail/FrequencyMap.cpp | #include "rapidcheck/detail/FrequencyMap.h"
namespace rc {
namespace detail {
FrequencyMap::FrequencyMap(const std::vector<std::size_t> &frequencies)
: m_sum(0) {
m_table.reserve(frequencies.size());
for (auto x : frequencies) {
m_sum += x;
m_table.push_back(m_sum);
}
}
std::size_t FrequencyMap::lo... | #include "rapidcheck/detail/FrequencyMap.h"
#include <algorithm>
namespace rc {
namespace detail {
FrequencyMap::FrequencyMap(const std::vector<std::size_t> &frequencies)
: m_sum(0) {
m_table.reserve(frequencies.size());
for (auto x : frequencies) {
m_sum += x;
m_table.push_back(m_sum);
}
}
std::s... | Add missing include in FrequencyMao | Add missing include in FrequencyMao
| C++ | bsd-2-clause | tm604/rapidcheck,whoshuu/rapidcheck,whoshuu/rapidcheck,tm604/rapidcheck,emil-e/rapidcheck,emil-e/rapidcheck,whoshuu/rapidcheck,tm604/rapidcheck,emil-e/rapidcheck,unapiedra/rapidfuzz,unapiedra/rapidfuzz,unapiedra/rapidfuzz |
30bec5829924725b63f8415504e562a1d71ad3b6 | examples/GeneticAlgoExample.cpp | examples/GeneticAlgoExample.cpp | #include "Fido/GeneticAlgo.h"
#include <math.h>
std::vector<double> getPopulationFitness(const std::vector<net::NeuralNet> &population) {
std::vector<double> fitnesses;
for(net::NeuralNet network : population) {
double totalError = 0;
for(double input = 1; input < 4; input++) {
totalError += pow(inp... | #include "Fido/GeneticAlgo.h"
#include <math.h>
std::vector<double> getPopulationFitness(const std::vector<net::NeuralNet> &population) {
std::vector<double> fitnesses;
for(net::NeuralNet network : population) {
double totalError = 0;
for(double input = 1; input < 4; input++) {
totalError += pow(inp... | Add getting of best network to GA example | Add getting of best network to GA example
| C++ | mit | patrickelectric/Fido,FidoProject/Fido,FlyingGraysons/Fido,FidoProject/Fido,njk345/Fido,FlyingGraysons/Fido,FlyingGraysons/Fido,patrickelectric/Fido,FidoProject/Fido,njk345/Fido,patrickelectric/Fido |
27f77911971513a4d2b1b820eaa09802acadfefa | 2015-dec-silver/3-bcount/cpp11/main.cpp | 2015-dec-silver/3-bcount/cpp11/main.cpp | #include <fstream>
#include <iostream>
#include <utility>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <algorithm>
using namespace std;
int main() {
ifstream fin("bcount.in");
ofstream fout("bcount.out");
int num_cows, num_queries;
fin >> num_cows >> num_queries;
vector<array<int, ... | #include <fstream>
#include <array>
#include <vector>
using namespace std;
int main() {
ifstream fin("bcount.in");
ofstream fout("bcount.out");
int num_cows, num_queries;
fin >> num_cows >> num_queries;
vector<array<int, 3>> totals(num_cows + 1);
for (int i = 0; i < num_cows; i++) {
int cow;
fin >> cow;
... | Remove debug and unused headers | 2015-dec-silver/3-bcount/cpp11: Remove debug and unused headers
| C++ | mit | hsun324/usaco-solutions,hsun324/usaco-solutions |
e050deab8da0f924c893c50a571f628dbf3913a6 | folly/ExceptionString.cpp | folly/ExceptionString.cpp | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... | Move an exception_ptr in exceptionStr | Move an exception_ptr in exceptionStr
Summary: [Folly] Move an `exception_ptr` in `exceptionStr`, which should be ever-so-slightly cheaper than copying it since that may avoid atomic refcount operations. It's not much cheaper overall because the throw/catch machinery remains expensive.
Reviewed By: ot, luciang
Diffe... | C++ | apache-2.0 | facebook/folly,facebook/folly,facebook/folly,facebook/folly,facebook/folly |
449d4f06fe7501ed53e3aaaa465a499442285e90 | test/CXX/class/class.union/p2-0x.cpp | test/CXX/class/class.union/p2-0x.cpp | // RUN: %clang_cc1 -verify -std=c++11 %s
// Unlike in C++98, C++11 allows unions to have static data members.
union U1 {
static constexpr int k1 = 0;
static const int k2 = k1;
static int k3 = k2; // expected-error {{non-const static data member must be initialized out of line}}
static constexpr double k4 = k2... | // RUN: %clang_cc1 -verify -std=c++11 %s
// Unlike in C++98, C++11 allows unions to have static data members.
union U1 {
static constexpr int k1 = 0;
static const int k2 = k1;
static int k3 = k2; // expected-error {{non-const static data member must be initialized out of line}}
static constexpr double k4 = k2... | Make sure we still reject static data members in anonymous unions in C++11. | Make sure we still reject static data members in anonymous unions in C++11.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@150724 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-cl... |
706e3fad8a8fe193fca5ef11bc574d10a4a886bb | src/stream_coder/stream_processor.cc | src/stream_coder/stream_processor.cc | #include <nekit/deps/easylogging++.h>
#include <nekit/stream_coder/detail/stream_coder_manager.h>
#include <nekit/stream_coder/stream_processor.h>
namespace nekit {
namespace stream_coder {
template <class T>
ActionRequest StreamProcessor<T>::Negotiate() {
return impl_->Negotiate();
}
template <class T>
BufferRese... | #include <nekit/deps/easylogging++.h>
#include <nekit/stream_coder/detail/stream_coder_manager.h>
#include <nekit/stream_coder/stream_processor.h>
namespace nekit {
namespace stream_coder {
template <class T>
StreamProcessor<T>::StreamProcessor() {
impl_ = new T();
}
template <class T>
StreamProcessor<T>::~StreamP... | Add constructor and destructor for StreamProcessor template | Add constructor and destructor for StreamProcessor template
| C++ | mit | zhuhaow/libnekit,zhuhaow/libnekit,zhuhaow/libnekit,zhuhaow/libnekit |
1d9c0934a02f08977a7d5e839a2665e4aa888ae5 | lib/MC/MCFixup.cpp | lib/MC/MCFixup.cpp | //===- MCFixup.cpp - Assembly Fixup Implementation ------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===- MCFixup.cpp - Assembly Fixup Implementation ------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Remove a variable from r206192 that is only used in an assert. | Remove a variable from r206192 that is only used in an assert.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@206195 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,G... |
40bf052d479fb3cb6230e3784d9ea256535d7f12 | chrome/renderer/renderer_main_platform_delegate_linux.cc | chrome/renderer/renderer_main_platform_delegate_linux.cc | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/renderer/renderer_main_platform_delegate.h"
#include "base/debug_util.h"
// This is a no op class because we do not have a sandbox ... | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/renderer/renderer_main_platform_delegate.h"
#include "base/debug_util.h"
// This is a no op class because we do not have a sandbox ... | Call setlocale(LC_ALL, "") in a renderer process for subsequent calls to SysNativeMBToWide and WideToSysNativeMB (that use mbstowcs and wcstombs) to work correctly. | Call setlocale(LC_ALL, "") in a renderer process for subsequent calls to
SysNativeMBToWide and WideToSysNativeMB (that use mbstowcs and wcstombs) to
work correctly.
This is a clone of http://codereview.chromium.org/155913
BUG=16860 (http://crbug.com/16860 )
TEST=Run Chrome with LC_ALL=en_US.UTF-8 and try to upload a ... | C++ | bsd-3-clause | gavinp/chromium,gavinp/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,Crystal... |
58cef954f28c1a6539518062f1cdd84035ff0b26 | src/surface.cpp | src/surface.cpp | #include "surface.h"
namespace batoid {
#pragma omp declare target
Surface::Surface() :
_devPtr(nullptr)
{}
Surface::~Surface() {}
bool Surface::timeToIntersect(
double x, double y, double z,
double vx, double vy, double vz,
double& dt
) const {
// Th... | #include "surface.h"
namespace batoid {
#pragma omp declare target
Surface::Surface() :
_devPtr(nullptr)
{}
Surface::~Surface() {}
bool Surface::timeToIntersect(
double x, double y, double z,
double vx, double vy, double vz,
double& dt
) const {
// Th... | Reduce iterations in generic intersection alg | Reduce iterations in generic intersection alg
| C++ | bsd-2-clause | jmeyers314/jtrace,jmeyers314/batoid,jmeyers314/jtrace,jmeyers314/jtrace,jmeyers314/batoid |
3508017fb3c1128b1adee06f268211f92855385a | ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/JSITracing.cpp | ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/JSITracing.cpp | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "JSITracing.h"
namespace facebook {
namespace jsi {
void addNativeTracingHooks(Runtime &rt) {
assert(false && "unimplem... | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "JSITracing.h"
namespace facebook {
namespace jsi {
void addNativeTracingHooks(Runtime &rt) {
// Unimplemented
}
} // n... | Remove unconditional assert from addNativeTracingHooks. Do nothing instead. | Remove unconditional assert from addNativeTracingHooks. Do nothing instead.
Summary:
This line was and apparently has always been triggered from the
HermesExecutorFactory. We just didn't notice because we didn't build with
assertions.
Changelog: [Internal] Don't crash on load when assertions and Hermes are enabled
R... | C++ | mit | janicduplessis/react-native,exponentjs/react-native,facebook/react-native,myntra/react-native,exponent/react-native,javache/react-native,janicduplessis/react-native,hoangpham95/react-native,hoangpham95/react-native,javache/react-native,hammerandchisel/react-native,javache/react-native,facebook/react-native,hoangpham95/... |
1a7ccb14e882e31ca83c88521f9e63b424c0dd24 | test/std/thread/thread.threads/thread.thread.class/thread.thread.member/detach.pass.cpp | test/std/thread/thread.threads/thread.thread.class/thread.thread.member/detach.pass.cpp | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... | Fix race condition in thread test. | Fix race condition in thread test.
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@237745 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
8105325b751b3561828e400b08570a2694d17c88 | src/object/centralized-slots.cc | src/object/centralized-slots.cc | #include <object/centralized-slots.hh>
namespace object
{
CentralizedSlots::content_type*
CentralizedSlots::content_ =
new CentralizedSlots::content_type();
CentralizedSlots::loc_index_type&
CentralizedSlots::loc_index_ =
CentralizedSlots::content_->get<0>();
CentralizedSlots::obj_index_type&
... | #include <object/centralized-slots.hh>
namespace object
{
// Allocated dynamically to avoid static destruction order
// fiasco. Some objects could indeed be destroyed after the hash
// table is destroyed.
CentralizedSlots::content_type*
CentralizedSlots::content_ =
new CentralizedSlots::content_type();... | Comment why the slots table is allocated on the heap. | Comment why the slots table is allocated on the heap.
* src/object/centralized-slots.cc: Here.
| C++ | bsd-3-clause | aldebaran/urbi,urbiforge/urbi,aldebaran/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,aldebaran/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,aldebaran/urbi,aldebaran/urbi,aldebaran/urbi,aldebaran/urbi,aldebaran/urbi |
076a2e8b68b2a6efd9494f3e61906feab77f7533 | zoom/zrs.cpp | zoom/zrs.cpp | // $Header: /home/cvsroot/yaz++/zoom/zrs.cpp,v 1.5 2003-07-02 10:25:13 adam Exp $
// Z39.50 Result Set class
#include "zoom.h"
namespace ZOOM {
resultSet::resultSet(connection &c, const query &q) : owner(c) {
ZOOM_connection yazc = c._getYazConnection();
rs = ZOOM_connection_search(yazc, q._getYazQuery());
i... | // $Header: /home/cvsroot/yaz++/zoom/zrs.cpp,v 1.6 2003-09-22 13:04:52 mike Exp $
// Z39.50 Result Set class
#include "zoom.h"
namespace ZOOM {
resultSet::resultSet(connection &c, const query &q) : owner(c) {
ZOOM_connection yazc = c._getYazConnection();
rs = ZOOM_connection_search(yazc, q._getYazQuery());
i... | Destroy half-created ZOOM-C result-set on failure, thanks to Phil Dennis <phil@booksys.com> | Destroy half-created ZOOM-C result-set on failure, thanks to Phil Dennis <phil@booksys.com>
| C++ | bsd-3-clause | indexgeo/yazpp,indexgeo/yazpp |
86647f3dd27558004ebe4b09d4d9eccdc2c88582 | kmail/kmfoldernode.cpp | kmail/kmfoldernode.cpp | // kmfoldernode.cpp
#include "kmfolderdir.h"
//-----------------------------------------------------------------------------
KMFolderNode::KMFolderNode(KMFolderDir* aParent, const QString& aName)
//: KMFolderNodeInherited(aParent)
{
mType = "node";
mName = aName;
mParent = aParent;
mDir = FALSE;
setName(m... | // kmfoldernode.cpp
#include "kmfolderdir.h"
//-----------------------------------------------------------------------------
KMFolderNode::KMFolderNode(KMFolderDir* aParent, const QString& aName)
//: KMFolderNodeInherited(aParent)
{
mType = "node";
mName = aName;
mParent = aParent;
mDir = FALSE;
}
//-------... | Remove superfluous setName(mName) from the c'tor. | Remove superfluous setName(mName) from the c'tor.
svn path=/trunk/kdenetwork/kmail/; revision=164257
| C++ | lgpl-2.1 | lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi |
16e678cc1869afdcffa0adffadfa4d6ce7b78d20 | Day2/Day2.cpp | Day2/Day2.cpp | // Day2.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int main()
{
std::ifstream Input("Input.txt");
if (!Input.is_open())
{
std::cout << "Error opening File!" << std::endl;
return 0;
}
std::string Line;
uint64_t WrappingPaper = 0;
while (std::getline(Input, Line))
{... | // Day2.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int main()
{
std::ifstream Input("Input.txt");
if (!Input.is_open())
{
std::cout << "Error opening File!" << std::endl;
return 0;
}
std::string Line;
uint64_t WrappingPaper = 0;
uint64_t Ribbon = 0;
while (std::ge... | Add solution for Day 2 part two | Add solution for Day 2 part two
| C++ | mit | jloehr/AdventOfCode,jloehr/AdventOfCode,jloehr/AdventOfCode |
98cef4df8e95648aaca0f499b069ba70dcdb30e3 | source/board/STM32/STM32F1/NUCLEO-F103RB/NUCLEO-F103RB-lowLevelInitialization.cpp | source/board/STM32/STM32F1/NUCLEO-F103RB/NUCLEO-F103RB-lowLevelInitialization.cpp | /**
* \file
* \brief board::lowLevelInitialization() implementation for NUCLEO-F103RB
*
* \author Copyright (C) 2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
*
* \par License
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL ... | /**
* \file
* \brief board::lowLevelInitialization() implementation for NUCLEO-F103RB
*
* \author Copyright (C) 2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
*
* \par License
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL ... | Enable GPIOA in board::lowLevelInitialization() for NUCLEO-F103RB | Enable GPIOA in board::lowLevelInitialization() for NUCLEO-F103RB
Enable clock for GPIOA if CONFIG_BOARD_LEDS_ENABLE option is defined. | C++ | mpl-2.0 | jasmin-j/distortos,CezaryGapinski/distortos,DISTORTEC/distortos,jasmin-j/distortos,jasmin-j/distortos,CezaryGapinski/distortos,CezaryGapinski/distortos,CezaryGapinski/distortos,DISTORTEC/distortos,jasmin-j/distortos,DISTORTEC/distortos,DISTORTEC/distortos,CezaryGapinski/distortos,jasmin-j/distortos |
33c07b089ffe638ef7ce710433b593afb9ff2346 | tests/test_main.cpp | tests/test_main.cpp | #include <QCoreApplication>
#include "qtyamltest.h"
#define RUN(klass) \
do { \
klass *obj = new klass(); \
status |= QTest::qExec(obj, argc, argv); \
delete obj; \
} while(0)
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
Q_UNUSED(app);
int status = ... | #include <QCoreApplication>
#include "qtyamltest.h"
#define RUN(klass) \
do { \
klass obj; \
status |= QTest::qExec(&obj, argc, argv); \
} while(0)
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
Q_UNUSED(app);
int status = 0;
RUN(HighLevelTests);
RUN(... | Simplify test case class construction | Simplify test case class construction
| C++ | mit | uranusjr/qtyaml,uranusjr/qtyaml |
acbc7b50b535624d45e8f2b2f0e269d0b39ba9cc | tests/test_iostreamsocket.cpp | tests/test_iostreamsocket.cpp | #include <sstream>
#include <gtest/gtest.h>
#include <errors.h>
#include <iostreamsocket.h>
#define TEST_CLASS IOStreamSocketTest
#define INIT_DATA ("dat_data_tho")
#define INIT_LEN (12)
class TEST_CLASS : public testing::Test {
protected:
TEST_CLASS() : in(INIT_DATA), sock(in, out) { }
std::stringstream in, ... | #include <sstream>
#include <gtest/gtest.h>
#include <errors.h>
#include <iostreamsocket.h>
#define TEST_CLASS IOStreamSocketTest
#define INIT_DATA ("dat data tho")
#define INIT_LEN (12)
class TEST_CLASS : public testing::Test {
protected:
TEST_CLASS() : in(INIT_DATA), sock(in, out) { }
std::stringstream in, ... | Use test data with spaces | Use test data with spaces
| C++ | mit | aroxby/cpu,aroxby/cpu |
c7b51a49e0b1c824e90428aad3aca4b687198e93 | src/ui/android/eventqueue.cpp | src/ui/android/eventqueue.cpp | // External Depdendencies
#include "../../../lib/jnipp/jnipp.h"
// Module Dependencies
#include "../include/app.h"
#include "../include/eventqueue.h"
namespace native
{
namespace ui
{
// Static Variable Initialisations
thread_local int EventQueue::_exitCode = 0;
bool EventQueue::handl... | // External Depdendencies
#include "../../../lib/jnipp/jnipp.h"
// Module Dependencies
#include "../include/app.h"
#include "../include/eventqueue.h"
namespace native
{
namespace ui
{
// Static Variable Initialisations
thread_local int EventQueue::_exitCode = 0;
bool EventQueue::handl... | Set exit code on quitting. | Set exit code on quitting.
| C++ | mit | mitchdowd/native,mitchdowd/native,mitchdowd/native |
0040a491784ce7057ec098183f9745333a3a993f | cpp/common_flags.cpp | cpp/common_flags.cpp | #include "gflags/gflags.h"
DEFINE_string(race_id, "", "");
DEFINE_bool(continuous_integration, true, "");
DEFINE_double(safe_angle, 60.0, "");
DEFINE_int32(handicap, 0, "");
DEFINE_bool(check_if_safe_ahead, true, "");
DEFINE_int32(answer_time, 10, "Time limit for answer in ms");
DEFINE_bool(bump_with_turbo, false, "... | #include "gflags/gflags.h"
DEFINE_string(race_id, "", "");
DEFINE_bool(continuous_integration, true, "");
DEFINE_double(safe_angle, 60.0, "");
DEFINE_int32(handicap, 0, "");
DEFINE_bool(check_if_safe_ahead, true, "");
DEFINE_int32(answer_time, 10, "Time limit for answer in ms");
DEFINE_bool(bump_with_turbo, true, "k... | Enable bump with turbo by default | Enable bump with turbo by default
| C++ | apache-2.0 | kareth/helloworldopen2014,kareth/helloworldopen2014,kareth/helloworldopen2014,kareth/helloworldopen2014,kareth/helloworldopen2014 |
947a78c6a7fdcc374ed1f1665757028c6efc6802 | base/test_file_util_mac.cc | base/test_file_util_mac.cc | // Copyright (c) 2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/test_file_util.h"
#include "base/logging.h"
namespace file_util {
bool EvictFileFromSystemCache(const FilePath& file) {
// TODO(po... | // Copyright (c) 2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/test_file_util.h"
#include "base/logging.h"
namespace file_util {
bool EvictFileFromSystemCache(const FilePath& file) {
// There i... | Change the stub for file_util::EvictFileFromSystemCache | Change the stub for file_util::EvictFileFromSystemCache
I don't think there is a way to get something out of the UBC once it's in,
so for now I'm just making this api return true so it won't fail unittests.
I have email out to Amit incase he has any ideas.
Review URL: http://codereview.chromium.org/42333
git-svn-id:... | C++ | bsd-3-clause | meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u... |
a894250823ff98c8856bb71f7c8c6e05b521094e | chrome/browser/extensions/extension_javascript_url_apitest.cc | chrome/browser/extensions/extension_javascript_url_apitest.cc | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_apitest.h"
#include "net/base/mock_host_resolver.h"
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, JavaScript... | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_apitest.h"
#include "net/base/mock_host_resolver.h"
// Disabled, http://crbug.com/63589.
IN_PROC_BROWSE... | Disable ExtensionApiTest.JavaScriptURLPermissions, it flakily hits an assertion. | Disable ExtensionApiTest.JavaScriptURLPermissions, it flakily hits an assertion.
TBR=aa
BUG=63589
TEST=browser_tests
Review URL: http://codereview.chromium.org/5221001
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@66600 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | hujiajie/pa-chromium,Just-D/chromium-1,rogerwang/chromium,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,robclark/chromium,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,hujiajie/pa-chromium,patrickm/chromium.src,nacl-webkit/chrome_deps,The... |
546f5818b846301ca87b8ae59c90828c67952c84 | src/Tonic/TableLookupOsc.cpp | src/Tonic/TableLookupOsc.cpp | //
// TableLookupOsc.cpp
// Tonic
//
// Created by Nick Donaldson on 2/8/13.
//
#include "TableLookupOsc.h"
namespace Tonic {
namespace Tonic_{
TableLookupOsc_::TableLookupOsc_() :
phase_(0.0)
{
modFrames_.resize(kSynthesisBlockSize, 1);
lookupTable_ = SampleTable(kSynthesisBlock... | //
// TableLookupOsc.cpp
// Tonic
//
// Created by Nick Donaldson on 2/8/13.
//
#include "TableLookupOsc.h"
namespace Tonic {
namespace Tonic_{
TableLookupOsc_::TableLookupOsc_() :
phase_(0.0)
{
modFrames_.resize(kSynthesisBlockSize, 1);
lookupTable_ = SampleTable(kSynthesisBlock... | Fix resizing for arbitrary lookup tables | Fix resizing for arbitrary lookup tables
| C++ | unlicense | eriser/Tonic,eriser/Tonic,diviaki/Tonic,kaikai03/Tonic,kaikai03/Tonic,mcanthony/Tonic,mcanthony/Tonic,TheWindInTheWillows/Tonic,TonicAudio/Tonic,UIKit0/Tonic,TheWindInTheWillows/Tonic,TonicAudio/Tonic,UIKit0/Tonic |
76714fcfa3f7d85f174ea285c1224406a1321f3a | tests/arcus/MockSocket.cpp | tests/arcus/MockSocket.cpp | //Copyright (c) 2018 Ultimaker B.V.
//CuraEngine is released under the terms of the AGPLv3 or higher.
#include "MockSocket.h"
namespace cura
{
MockSocket::MockSocket()
{
}
void MockSocket::connect(const std::string& address, int port) { /* Do nothing. */ }
void MockSocket::listen(const std::string& address, int por... | //Copyright (c) 2018 Ultimaker B.V.
//CuraEngine is released under the terms of the AGPLv3 or higher.
#include "MockSocket.h"
namespace cura
{
MockSocket::MockSocket()
{
}
void MockSocket::connect(const std::string&, int) { /* Do nothing. */ }
void MockSocket::listen(const std::string&, int) { /* Do nothing. */ }
v... | Remove names of unused variables | Remove names of unused variables
This signals to the compiler that we know that these are unused and prevents GCC from giving a warning about it.
Contributes to issue CURA-4410.
| C++ | agpl-3.0 | Ultimaker/CuraEngine,Ultimaker/CuraEngine |
4f758dc7ac04ab0885391cc7218586d8643bb569 | src/driver/krs_servo/src/krs_servo_node.cpp | src/driver/krs_servo/src/krs_servo_node.cpp | #include "ros/ros.h"
#include "servo_msgs/KrsServoDegree.h"
#include "krs_servo_driver.hpp"
class KrsServoNode {
public:
KrsServoNode();
explicit KrsServoNode(ros::NodeHandle& nh);
private:
void krsServoDegreeCallback(const servo_msgs::KrsServoDegree::ConstPtr& msg);
ros::Subscriber sub;
KrsServoDriver kr... | #include "ros/ros.h"
#include "servo_msgs/KrsServoDegree.h"
#include "krs_servo_driver.hpp"
class KrsServoNode {
public:
KrsServoNode();
explicit KrsServoNode(ros::NodeHandle& nh);
private:
void krsServoDegreeCallback(const servo_msgs::KrsServoDegree::ConstPtr& msg);
ros::Subscriber sub;
KrsServoDriver kr... | Fix invalid inline because get pointer | Fix invalid inline because get pointer
| C++ | mit | agrirobo/arcsys2,agrirobo/arcsys2 |
aa1eb728726ce98be5cd95dee69e484300b260f6 | remoting/protocol/key_event_tracker.cc | remoting/protocol/key_event_tracker.cc | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "remoting/protocol/key_event_tracker.h"
#include "base/logging.h"
#include "remoting/proto/event.pb.h"
namespace remoting {
namespace proto... | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "remoting/protocol/key_event_tracker.h"
#include "base/logging.h"
#include "remoting/proto/event.pb.h"
namespace remoting {
namespace proto... | Remove erroneous DCHECK from KeyEventTracker | Remove erroneous DCHECK from KeyEventTracker
Remove DCHECK from KeyEventTracker's destructor that erroneously
asserted that the pressed_keys_ set had to be empty before the plugin
shutdowns. This DCHECK would fire under valid conditions, e.g. if one
would close the browser window while holding down a key.
BUG=1147... | C++ | bsd-3-clause | gavinp/chromium,ropik/chromium,ropik/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,ropik/chromium... |
0fa689e5f7c4164088f9a3d474da286f0250a81c | testing/test_single_agent_async_execute.cpp | testing/test_single_agent_async_execute.cpp | #include <agency/new_executor_traits.hpp>
#include <cassert>
#include <iostream>
#include "test_executors.hpp"
template<class Executor>
void test()
{
using executor_type = Executor;
{
// returning void
executor_type exec;
int set_me_to_thirteen = 0;
auto f = agency::new_executor_traits<exe... | #include <agency/new_executor_traits.hpp>
#include <cassert>
#include <iostream>
#include "test_executors.hpp"
template<class Executor>
void test()
{
using executor_type = Executor;
{
// returning void
executor_type exec;
int set_me_to_thirteen = 0;
auto f = agency::new_executor_traits<exe... | Validate the executor as part of the test | Validate the executor as part of the test
| C++ | bsd-3-clause | egaburov/agency,egaburov/agency |
ef19fb90bd889112d3a32bc3d2f6365538fc4ede | chrome/common/nacl_cmd_line.cc | chrome/common/nacl_cmd_line.cc | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/basictypes.h"
#include "base/command_line.h"
#include "chrome/common/chrome_switches.h"
namespace nacl {
void CopyNaClCommandLineArgu... | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/basictypes.h"
#include "base/command_line.h"
#include "chrome/common/chrome_switches.h"
namespace nacl {
void CopyNaClCommandLineArgu... | Remove the switches kSilentDumpOnDCHECK and kMemoryProfiling from NaCl and broker processes. | Remove the switches kSilentDumpOnDCHECK and kMemoryProfiling from NaCl and broker processes.
The reason for removing these flags is because they seem to not be used, and they cause a problem in moving NaCl code to components, because they are defined in the chrome layer.
This is in preparation to move NaCl code to co... | C++ | bsd-3-clause | hgl888/chromium-crosswalk,jaruba/chromium.src,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,littlstar/chromium.src,anirudhSK/chromium,Chilledheart/chromium,ChromiumWebApps/chromium,ltilve/chromium,littlstar/chromium.src,dednal/chromium.src,anirudhSK/chromium,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk... |
a5819cb1bd07809cb1ea2f4ec0ff594ea2d942b8 | test/msan/vector_cvt.cc | test/msan/vector_cvt.cc | // RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t
// RUN: %clangxx_msan -DPOSITIVE -m64 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
#include <emmintrin.h>
int to_int(double v) {
__m128d t = _mm_set_sd(v);
int x = _mm_cvtsd_si32(t);
return x;
// CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
... | // RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t
// RUN: %clangxx_msan -DPOSITIVE -m64 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
#include <emmintrin.h>
int to_int(double v) {
__m128d t = _mm_set_sd(v);
int x = _mm_cvtsd_si32(t);
return x;
// CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
... | Fix line numbers for code inlined from __nodebug__ functions. | Fix line numbers for code inlined from __nodebug__ functions.
Instructions from __nodebug__ functions don't have file:line
information even when inlined into no-nodebug functions. As a result,
intrinsics (SSE and other) from <*intrin.h> clang headers _never_
have file:line information.
With this change, an instructio... | C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
c5d7b3bb98236cf8d069ea6f2e97c7934b9d73d7 | chrome/browser/extensions/window_open_interactive_apitest.cc | chrome/browser/extensions/window_open_interactive_apitest.cc | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
class WindowOpenPa... | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
class WindowOpenPa... | Disable WindowOpenPanelTest.WindowOpenFocus on Windows debug builds. | Disable WindowOpenPanelTest.WindowOpenFocus on Windows debug builds.
This test is timing out consistently on the Win7 Tests (dbg)(1) bot.
TBR=jennb@chromium.org
BUG=253417
Review URL: https://codereview.chromium.org/1061543005
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#326684}
| C++ | bsd-3-clause | Pluto-tv/chromium-crosswalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,Just-D/chromium-... |
f6fb0fd7f02657e6a0d35e9acd2cae42d833a28c | examples/tables.cpp | examples/tables.cpp | #include <sol.hpp>
#include <string>
#include <iostream>
/// this example shows how to read data in from a lua table
using namespace std;
//compiles on linux with: g++ -std=c++11 -I.. table.cpp -o tables -llua
int main(int argc, char * argv[])
{
sol::state lua;
//table used as an array
lua.script("table1 = {\"... | #include <sol.hpp>
#include <string>
#include <iostream>
// this example shows how to read data in from a lua table
int main() {
sol::state lua;
// table used as an array
lua.script("table1 = {\"hello\", \"table\"}");
// table with a nested table and the key value syntax
lua.script("table2 = {"
... | Improve formatting of table example | Improve formatting of table example
| C++ | mit | systemmovie/sol,billw2012/sol2,ThePhD/sol,ThePhD/sol2,ThePhD/sol2,systemmovie/sol,nshcat/sol2,Rapptz/sol,nshcat/sol2,Rapptz/sol,OrfeasZ/sol2,OrfeasZ/sol2,ThePhD/sol2,OrfeasZ/sol2,ThePhD/sol,ThePhD/sol2,billw2012/sol2,billw2012/sol2,OrfeasZ/sol2,billw2012/sol2 |
85fda71a07a2d5f76c3b826f8a8d7c77beaf5621 | main.cpp | main.cpp | #include "mainwindow.h"
#include <QApplication>
QString _defaultPathAudio = "";
QString _defaultPathProjects = "";
QString _defaultPathOutput = "";
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
| #include "mainwindow.h"
#include <QApplication>
QString _defaultPathAudio = "";
QString _defaultPathProjects = "";
QString _defaultPathOutput = "";
int main(int argc, char *argv[])
{
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Round);
QApplication::setAttr... | Support high-dpi screens in Windows | Support high-dpi screens in Windows
| C++ | unlicense | KaiDrange/OctaChainer,KaiDrange/OctaChainer |
f1546581e5e74157e17e65976a84674da2ae0b41 | test/std/input.output/iostreams.base/ios.base/ios.base.storage/xalloc.pass.cpp | test/std/input.output/iostreams.base/ios.base/ios.base.storage/xalloc.pass.cpp | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | Increase portability of xalloc test | [libc++] Increase portability of xalloc test
Do not assume that xalloc() starts at 0, which is not specified by the
Standard.
Thanks to Andrey Maksimov for the patch.
Differential Revision: https://reviews.llvm.org/D58299
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@355160 91177308-0d34-0410-b5e6-96231b3b80d... | C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
b2189c01fa34c475a53c379489717ba8d3c073c5 | test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp | test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... | Disable test in C++<11 mode due to use of alignas. | Disable test in C++<11 mode due to use of alignas.
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@324033 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
1bdbb434451ff143d49acddfc5428c9f9dd40dcf | src/01/pi.cc | src/01/pi.cc | /** @file.cc
* π approximation
*/
#include <iostream>
#include <random>
/** Approximate π in a number of runs.
* @param N the number of runs
* @param rng the random number generator used
* @return an approximation of π
*/
double ApproximatePi(const size_t N, std::mt19937 &rng) {
static std::uniform_real_distri... | /** @file.cc
* π approximation
*/
#include <cmath>
#include <iomanip>
#include <iostream>
#include <random>
/** Approximate π in a number of runs.
* @param N the number of runs
* @param rng the random number generator used
* @return an approximation of π
*/
double ApproximatePi(const size_t N, std::mt19937 &rng... | Add comparison to "real" value. | Add comparison to "real" value.
| C++ | mit | kdungs/coursework-computational-physics,kdungs/coursework-computational-physics |
76b40bbf5a1f637d386a6dc4009c28588d2214ea | src/Main.cpp | src/Main.cpp | /**
* Tower Defence Pro #005
* (C) 2010 - Samuel Andersson, Björn Ekberg
*/
#ifdef _WIN32
#define _CRTDBG_MAP_ALLOC
#include <cstdlib>
#include <crtdbg.h>
#endif
#include <Core/Game.h>
#include <Core/GameEngine.h>
#include <ctime>
#include <memory>
#include <Utils/Log.h>
int main(int argc, char *argv[])
{
/** Se... | /**
* Tower Defence Pro #005
* (C) 2010 - Samuel Andersson, Björn Ekberg
*/
#if defined(_WIN32) && (_DEBUG)
#define _CRTDBG_MAP_ALLOC
#include <cstdlib>
#include <crtdbg.h>
#endif
#include <Core/Game.h>
#include <Core/GameEngine.h>
#include <ctime>
#include <memory>
#include <Utils/Log.h>
int main(int argc, char ... | Set logging level based on build | Set logging level based on build
| C++ | mit | trew/TDP005,trew/TDP005 |
934da7636d0cc811600c2dd73c6cd386f0851e25 | src/test.cpp | src/test.cpp | /*****************************************************************************
*
* utouch-frame - Touch Frame Library
*
* Copyright (C) 2011 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free S... | /*****************************************************************************
*
* utouch-frame - Touch Frame Library
*
* Copyright (C) 2011 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free S... | Throw runtime_error if Test::SetUp fails to open connection to server | Throw runtime_error if Test::SetUp fails to open connection to server
gtest treats exceptions as test failures, so this should have the same
result but is a cleaner implementation.
| C++ | mit | freedesktop-unofficial-mirror/xorg__test__xorg-gtest,freedesktop-unofficial-mirror/xorg__test__xorg-gtest,freedesktop-unofficial-mirror/xorg__test__xorg-gtest |
fc5867296ac1b4e816dcaa8a1381eedc0da34b51 | src/libwintermutecore/module.cpp | src/libwintermutecore/module.cpp | #include "module.hh"
#include "module.hpp"
#include "logging.hpp"
using Wintermute::Module;
using Wintermute::Module;
using Wintermute::ModulePrivate;
Module::Module(const Designation& designation) : d_ptr(new ModulePrivate)
{
W_PRV(Module);
d->designation = designation;
wtrace("Module " + static_cast<string>(d... | #include "module.hh"
#include "module.hpp"
#include "logging.hpp"
using Wintermute::Module;
using Wintermute::Module;
using Wintermute::ModulePrivate;
Module::Module(const Designation& designation) : d_ptr(new ModulePrivate)
{
W_PRV(Module);
d->designation = designation;
wtrace("Module " + static_cast<string>(d... | Use argument instead of method for designation. | Use argument instead of method for designation.
| C++ | mit | jalcine/wintermute,jalcine/wintermute,jalcine/wintermute |
6a2e192dcbe75be1fe45423c18297d57f372a0a4 | test/asan/TestCases/Linux/odr-vtable.cc | test/asan/TestCases/Linux/odr-vtable.cc | // RUN: %clangxx_asan -fno-rtti -DBUILD_SO1 -fPIC -shared %s -o %dynamiclib1
// RUN: %clangxx_asan -fno-rtti -DBUILD_SO2 -fPIC -shared %s -o %dynamiclib2
// RUN: %clangxx_asan -fno-rtti %s %ld_flags_rpath_exe1 %ld_flags_rpath_exe2 -o %t
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2 not %run %t 2... | // RUN: %clangxx_asan -fno-rtti -DBUILD_SO1 -fPIC -shared %s -o %dynamiclib1
// RUN: %clangxx_asan -fno-rtti -DBUILD_SO2 -fPIC -shared %s -o %dynamiclib2
// RUN: %clangxx_asan -fno-rtti %s %ld_flags_rpath_exe1 %ld_flags_rpath_exe2 -o %t
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2 not %run %t 2... | Revert "[asan] Disable test on powerpc64be" | Revert "[asan] Disable test on powerpc64be"
Now the test is passing on that bot. Some incremental build issues?
This reverts commit e00b5a5229ae02088d9f32a4e328eaa08abaf354.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@349852 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
5c0592264db2ba72b4fb85a4eab94d708eb996f1 | libqimessaging/qt/src/qisession.cpp | libqimessaging/qt/src/qisession.cpp | /*
** Author(s):
** - Cedric GESTES <gestes@aldebaran-robotics.com>
**
** Copyright (C) 2012 Aldebaran Robotics
*/
#include <iostream>
#include <qimessaging/qisession.h>
#include <qimessaging/session.hpp>
class QiSessionPrivate {
public:
qi::Session session;
};
QiSession::QiSession()
: _p(new QiSessionPrivate... | /*
** Author(s):
** - Cedric GESTES <gestes@aldebaran-robotics.com>
**
** Copyright (C) 2012 Aldebaran Robotics
*/
#include <iostream>
#include <qimessaging/qisession.h>
#include <qimessaging/session.hpp>
class QiSessionPrivate {
public:
qi::Session session;
};
QiSession::QiSession()
: _p(new QiSessionPrivate... | Add return statements in non-void functions. | Add return statements in non-void functions.
| C++ | bsd-3-clause | aldebaran/libqi-java,aldebaran/libqi-java,aldebaran/libqi-java,aldebaran/libqi,aldebaran/libqi,vbarbaresi/libqi,bsautron/libqi,aldebaran/libqi |
d7b13353283cde9111209cc13ebca96807b13048 | src/main.cpp | src/main.cpp | #include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "edges.hpp"
#include "sharpen.hpp"
int main() {
cv::Mat image(cv::imread("swiss.jpg"));
cv::Mat edges;
//std::cout << image.channels() << std::endl;
findEdges(image, edges);
cv::imshow("nyc.jpg", image);
cv::im... | #include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "edges.hpp"
#include "sharpen.hpp"
int main(int argc, char* argv[]) {
if(argc < 2) {
std::cerr << "Please enter the name of the image file in which to find edges." << std::endl;
return 0;
}
std::string imageFil... | Enable image input from console | Enable image input from console
| C++ | unlicense | yannlandry/DumbEdgeFinder |
251da843e265594386a267211823cc67d11ec487 | src/examples/led.cpp | src/examples/led.cpp | #include <iostream>
#include "CmdMessenger.h"
using namespace std;
enum
{
ksetled
};
int main(int argc, char *argv[])
{
if(argc == 2){
char op;
cmd::CmdMessenger arduino(argv[1], 9600);
cmd::Cmd led(ksetled);
cmd::Timeout timeout = cmd::Timeout::simpleTimeout(1000);
arduino.setTimeout(time... | #include <iostream>
#include "CmdMessenger.h"
using namespace std;
enum
{
ksetled
};
int main(int argc, char *argv[])
{
if(argc == 2){
char op;
cmd::CmdMessenger arduino(argv[1], 115200);
cmd::Cmd led(ksetled);
cmd::Timeout timeout = cmd::Timeout::simpleTimeout(1000);
arduino.setTimeout(ti... | Change the baudrate according to the CmdMessenger Receive example | Change the baudrate according to the CmdMessenger Receive example
| C++ | mit | fco-edno/cmdMessenger-cpp,fco-edno/cmdMessenger-cpp |
969d6633d60a2d37b9135d4149ab3b5b27b1144c | chrome/browser/icon_loader.cc | chrome/browser/icon_loader.cc | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/icon_loader.h"
#include "base/message_loop.h"
#include "base/mime_util.h"
#include "base/thread.h"
#include "chrome/browser/... | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/icon_loader.h"
#include "base/message_loop.h"
#include "base/mime_util.h"
#include "base/thread.h"
#include "chrome/browser/... | Initialize target_message_loop_ in the constructor. | Coverity: Initialize target_message_loop_ in the constructor.
CID=3970
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/233001
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@26985 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | patrickm/chromium.src,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,markYoungH/chromium.src,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,littlstar/chromium.src,jaruba/chromium.src,c... |
a2a02703e2f3b3bb26081b605af62ac7309562a2 | config.tests/sensord/main.cpp | config.tests/sensord/main.cpp | #include <sensormanagerinterface.h>
#include <datatypes/magneticfield.h>
int main()
{
SensorManagerInterface* m_remoteSensorManager;
m_remoteSensorManager = &SensorManagerInterface::instance();
return 0;
}
| #include <sensormanagerinterface.h>
#include <datatypes/magneticfield.h>
#include <abstractsensor.h>
#include <abstractsensor_i.h>
int main()
{
SensorManagerInterface* m_remoteSensorManager;
m_remoteSensorManager = &SensorManagerInterface::instance();
QList<DataRange> (AbstractSensorChannelInterface::*func... | Update the sensord config test | Update the sensord config test
Pulse seems to have an old version so it's breaking. Update the test
to use the same code the plugin uses so that this isn't allowed.
| C++ | lgpl-2.1 | KDE/android-qt-mobility,enthought/qt-mobility,KDE/android-qt-mobility,qtproject/qt-mobility,kaltsi/qt-mobility,qtproject/qt-mobility,tmcguire/qt-mobility,kaltsi/qt-mobility,enthought/qt-mobility,qtproject/qt-mobility,kaltsi/qt-mobility,qtproject/qt-mobility,qtproject/qt-mobility,enthought/qt-mobility,tmcguire/qt-mobili... |
ce3d0c03d1e8c6ecd9aa20c6de477fec1ebdfb2f | content/browser/renderer_host/render_view_host_observer.cc | content/browser/renderer_host/render_view_host_observer.cc | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/renderer_host/render_view_host_observer.h"
#include "content/browser/renderer_host/render_view_host.h"
RenderViewHostObser... | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/renderer_host/render_view_host_observer.h"
#include "content/browser/renderer_host/render_view_host.h"
RenderViewHostObser... | Fix invalid write in RenderViewHostObserver. | Fix invalid write in RenderViewHostObserver.
TBR=avi
Review URL: http://codereview.chromium.org/6813065
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@81023 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | robclark/chromium,ondra-novak/chromium.src,robclark/chromium,rogerwang/chromium,ChromiumWebApps/chromium,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,junmin-zhu/c... |
38dabcd7e0d2caa9191e0ec9f5a0f4b77b89ffcf | src/hash/sha1_ia32/sha1_ia32.cpp | src/hash/sha1_ia32/sha1_ia32.cpp | /*************************************************
* SHA-160 (IA-32) Source File *
* (C) 1999-2007 Jack Lloyd *
*************************************************/
#include <botan/sha1_ia32.h>
#include <botan/loadstor.h>
namespace Botan {
namespace {
extern "C"
void botan_sha... | /*************************************************
* SHA-160 (IA-32) Source File *
* (C) 1999-2007 Jack Lloyd *
*************************************************/
#include <botan/sha1_ia32.h>
#include <botan/loadstor.h>
namespace Botan {
namespace {
extern "C"
void botan_sha... | Update SHA1_IA32 to use compress_n | Update SHA1_IA32 to use compress_n
| C++ | bsd-2-clause | randombit/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/... |
fe164f7a07e03d0a4e14bf310e606f1c978c3935 | chrome/renderer/renderer_main_platform_delegate_linux.cc | chrome/renderer/renderer_main_platform_delegate_linux.cc | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/renderer/renderer_main_platform_delegate.h"
#include "base/debug_util.h"
// This is a no op class because we do not have a sandbox ... | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/renderer/renderer_main_platform_delegate.h"
#include "base/debug_util.h"
// This is a no op class because we do not have a sandbox ... | Convert sandbox NOTIMPLEMENTED()s into a bug. | Convert sandbox NOTIMPLEMENTED()s into a bug.
Review URL: http://codereview.chromium.org/27179
git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@10410 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
| C++ | bsd-3-clause | wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser |
2eb272931070b4294eb623611ed892ba3d828284 | test/CodeGenCXX/2012-03-16-StoreAlign.cpp | test/CodeGenCXX/2012-03-16-StoreAlign.cpp | // RUN: %clang_cc1 -emit-llvm -o - -triple x86_64-apple-darwin %s | FileCheck %s
// <rdar://problem/11043589>
struct Length {
Length(double v) {
m_floatValue = static_cast<float>(v);
}
bool operator==(const Length& o) const {
return getFloatValue() == o.getFloatValue();
}
bool operator!=(const Lengt... | // RUN: %clang_cc1 -emit-llvm -o - -triple x86_64-apple-darwin %s | FileCheck %s
// <rdar://problem/11043589>
struct Length {
Length(double v) {
m_floatValue = static_cast<float>(v);
}
bool operator==(const Length& o) const {
return getFloatValue() == o.getFloatValue();
}
bool operator!=(const Lengt... | Make the storing variable's name generic. | Make the storing variable's name generic.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@152963 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl... |
4d19b00c816dec32a98d81a6a36da0d776f92952 | src/vast/sink/json.cc | src/vast/sink/json.cc | #include "vast/sink/json.h"
#include "vast/util/json.h"
namespace vast {
namespace sink {
json::json(path p)
: stream_{std::move(p)}
{
}
bool json::process(event const& e)
{
auto j = to<util::json>(e);
if (! j)
return false;
auto str = to_string(*j);
str += '\n';
return stream_.write(str.begin(), s... | #include "vast/sink/json.h"
#include "vast/util/json.h"
namespace vast {
namespace sink {
json::json(path p)
: stream_{std::move(p)}
{
}
bool json::process(event const& e)
{
auto j = to<util::json>(e);
if (! j)
return false;
auto str = to_string(*j, true);
str += '\n';
return stream_.write(str.begi... | Print JSON in tree format. | Print JSON in tree format.
| C++ | bsd-3-clause | vast-io/vast,vast-io/vast,mavam/vast,mavam/vast,vast-io/vast,vast-io/vast,mavam/vast,pmos69/vast,mavam/vast,vast-io/vast,pmos69/vast,pmos69/vast,pmos69/vast |
c056dcc109f8569f74d76259c82884aabc79bb1b | test/priority_pb_tests.cpp | test/priority_pb_tests.cpp | #include <gtest/gtest.h>
#include <chrono>
#include <iostream>
#include <random>
#include <string>
#include <thread>
#include "priority.pb.h"
#include "prioritybuffer.h"
#define NUM_ITEMS 1000
unsigned long long get_priority(const PriorityMessage& message) {
return message.priority();
}
TEST(PriorityProtobufTe... | #include <gtest/gtest.h>
#include <chrono>
#include <iostream>
#include <random>
#include <string>
#include <thread>
#include "priority.pb.h"
#include "prioritybuffer.h"
#define NUM_ITEMS 1000
unsigned long long get_priority(const PriorityMessage& message) {
return message.priority();
}
TEST(PriorityProtobufTe... | Use a true random number generator in the priority protobuf test | Use a true random number generator in the priority protobuf test
| C++ | mit | prismskylabs/PriorityBuffer |
f0c785d3110bbdc3ff7ae353bb52f9d0347de27c | tests/xml_builder_test.cpp | tests/xml_builder_test.cpp | // This file is part of MicroRestD <http://github.com/ufal/microrestd/>.
//
// Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
// Mathematics and Physics, Charles University in Prague, Czech Republic.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If... | // This file is part of MicroRestD <http://github.com/ufal/microrestd/>.
//
// Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
// Mathematics and Physics, Charles University in Prague, Czech Republic.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If... | Write newline after serialized XML. | Write newline after serialized XML.
| C++ | mpl-2.0 | ufal/microrestd,ufal/microrestd,ufal/microrestd,ufal/microrestd,ufal/microrestd |
b96ce01233918450b76b370d6bcd4ee91d92a4f4 | src/controllers/dashboardcontroller.cpp | src/controllers/dashboardcontroller.cpp | #include "dashboardcontroller.h"
#include "serialization/result.h"
#include "infrastructure/contentservice.h"
#include <fstream>
ApiMock::DashboardController::DashboardController(ContentService* content)
: _content(content) {}
ApiMock::ResponseData ApiMock::DashboardController::get(RequestData request) {
auto cont... | #include "dashboardcontroller.h"
#include "serialization/result.h"
#include "infrastructure/contentservice.h"
#include <fstream>
#include <infrastructure/exceptions.h>
ApiMock::DashboardController::DashboardController(ContentService* content)
: _content(content) {}
ApiMock::ResponseData ApiMock::DashboardController... | Return 404's when expected dashboard file missing | Return 404's when expected dashboard file missing
| C++ | mit | Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock |
657efb68cd94ea0b2517fec15c486d25e3ff802f | Foundation/PlatformNix.cpp | Foundation/PlatformNix.cpp | // For conditions of distribution and use, see copyright notice in license.txt
#include "StableHeaders.h"
#include "PlatformNix.h"
#include "Framework.h"
#if !defined(_WINDOWS)
namespace Foundation
{
std::string PlatformNix::GetApplicationDataDirectory()
{
char *ppath = NULL;
ppa... | // For conditions of distribution and use, see copyright notice in license.txt
#include "StableHeaders.h"
#include "PlatformNix.h"
#include "Framework.h"
#if !defined(_WINDOWS)
namespace Foundation
{
std::string PlatformNix::GetApplicationDataDirectory()
{
char *ppath = NULL;
ppa... | Fix getting application name config string on non-windows systems. | Fix getting application name config string on non-windows systems.
git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@479 5b2332b8-efa3-11de-8684-7d64432d61a3
| C++ | apache-2.0 | antont/tundra,AlphaStaxLLC/tundra,jesterKing/naali,pharos3d/tundra,jesterKing/naali,antont/tundra,AlphaStaxLLC/tundra,BogusCurry/tundra,jesterKing/naali,BogusCurry/tundra,BogusCurry/tundra,AlphaStaxLLC/tundra,BogusCurry/tundra,pharos3d/tundra,antont/tundra,antont/tundra,AlphaStaxLLC/tundra,antont/tundra,AlphaStaxLLC/tu... |
ead3ec62cf8c1cd9d0b42ca689249411401a0fa8 | You-NLP-Tests/nlp_tests.cpp | You-NLP-Tests/nlp_tests.cpp | /// Project-level integration tests
#include "stdafx.h"
#include <CppUnitTest.h>
using Assert = Microsoft::VisualStudio::CppUnitTestFramework::Assert;
namespace You {
namespace NLP {
namespace Tests {
TEST_CLASS(NlpTests) {
public:
};
} // namespace Tests
} // namespace NLP
} // namespace You
| /// Project-level integration tests
#include "stdafx.h"
#include <CppUnitTest.h>
using Assert = Microsoft::VisualStudio::CppUnitTestFramework::Assert;
namespace You {
namespace NLP {
namespace UnitTests {
TEST_CLASS(NlpTests) {
public:
};
} // namespace UnitTests
} // namespace NLP
} // namespace You
| Exclude the NLP Tests class also. | Exclude the NLP Tests class also.
| C++ | mit | cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main |
17859a0635756e9c047a18101269b7d84af1ca95 | src/SearchMenu/SdkModel/SearchMenuPerformedSearchMessageHandler.cpp | src/SearchMenu/SdkModel/SearchMenuPerformedSearchMessageHandler.cpp | // Copyright eeGeo Ltd (2012-2015), All Rights Reserved
#include "SearchMenuPerformedSearchMessageHandler.h"
namespace ExampleApp
{
namespace SearchMenu
{
namespace SdkModel
{
SearchMenuPerformedSearchMessageHandler::SearchMenuPerformedSearchMessageHandler(Search::SdkModel::ISearch... | // Copyright eeGeo Ltd (2012-2015), All Rights Reserved
#include "SearchMenuPerformedSearchMessageHandler.h"
namespace ExampleApp
{
namespace SearchMenu
{
namespace SdkModel
{
SearchMenuPerformedSearchMessageHandler::SearchMenuPerformedSearchMessageHandler(Search::SdkModel::ISearch... | Fix MPLY-9622 - Re-running search using Search button after selecting a result will not show all rooms as highlighted Buddy:Jordan.Brown | Fix MPLY-9622 - Re-running search using Search button after selecting a result will not show all rooms as highlighted Buddy:Jordan.Brown
| C++ | bsd-2-clause | eegeo/eegeo-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,eegeo/ee... |
821e5ea794b8a024ffd1532172d449355f04e4de | BinarySearch/main.cpp | BinarySearch/main.cpp | /*
*
Just playing around with binary and linear search. No idea.
*/
#include <iostream>
using namespace std;
int foo[10] = { 2, 16, 40, 77, 88, 99, 105, 120, 150 };
int n, result = 0;
int length = 10;
int sillySearch(int element) {
//Figure out array length and make first split
length = length / 2;
result = foo... | /*
*
Implementing binary search
*/
#include <iostream>
using namespace std;
//get rid of fixed array
int foo[10] = { 2, 16, 40, 77, 88, 99, 105, 120, 150 };
int sillySearch(int element) {
int minIndex = 0;
int maxIndex = 10 - 1; //array.length here plz
int curElement, curIndex;
while (minIndex < maxIndex) {
... | Add more proper pure BinarySearch algorithm removing linear search | Add more proper pure BinarySearch algorithm removing linear search
| C++ | mit | jmietola/cbox |
e1e181fad1a73e9dee38a2bd74518e1b8d446930 | src/test/fuzz/kitchen_sink.cpp | src/test/fuzz/kitchen_sink.cpp | // Copyright (c) 2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <util/error.h>
#includ... | // Copyright (c) 2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <rpc/util.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <... | Add fuzzing coverage for JSONRPCTransactionError(...) and RPCErrorFromTransactionError(...) | tests: Add fuzzing coverage for JSONRPCTransactionError(...) and RPCErrorFromTransactionError(...)
| C++ | mit | rnicoll/bitcoin,practicalswift/bitcoin,particl/particl-core,fanquake/bitcoin,instagibbs/bitcoin,EthanHeilman/bitcoin,jlopp/statoshi,pataquets/namecoin-core,yenliangl/bitcoin,EthanHeilman/bitcoin,alecalve/bitcoin,bitcoinsSG/bitcoin,domob1812/bitcoin,EthanHeilman/bitcoin,GroestlCoin/bitcoin,mm-s/bitcoin,midnightmagic/bit... |
4e9594a2183a40246cd986cad26d880dceea432a | code/results/PermuteTestResult.cpp | code/results/PermuteTestResult.cpp | #include "PermuteTestResult.h"
namespace fs_testing {
using std::ostream;
using std::string;
using std::to_string;
ostream& PermuteTestResult::PrintCrashState(ostream& os) const {
for (unsigned int i = 0; i < crash_state.size() - 1; ++i) {
os << to_string(crash_state.at(i)) << ", ";
}
os << to_string(crash... | #include "PermuteTestResult.h"
namespace fs_testing {
using std::ostream;
using std::string;
using std::to_string;
ostream& PermuteTestResult::PrintCrashState(ostream& os) const {
if (crash_state.size() == 0) {
return os;
}
for (unsigned int i = 0; i < crash_state.size() - 1; ++i) {
os << to_string(cra... | Fix out of bounds exception when printing crash states. | Fix out of bounds exception when printing crash states.
| C++ | apache-2.0 | utsaslab/crashmonkey,utsaslab/crashmonkey,utsaslab/crashmonkey,utsaslab/crashmonkey |
562944a1bc398f8b1b84256508963c8126951df9 | tests/libport/pthread.cc | tests/libport/pthread.cc | #include <string>
#include <libport/pthread.h>
#include <libport/unit-test.hh>
using libport::test_suite;
std::string truth("vim is future");
void* thread1(void* data)
{
std::string del((char *) data);
size_t pos = truth.find(del);
truth.erase(pos, pos + del.size());
return 0;
}
void* thread2(void* data)
{... | #include <string>
#include <libport/pthread.h>
#include <libport/unit-test.hh>
using libport::test_suite;
std::string truth("vim is future");
void* thread1(void* data)
{
std::string del((char *) data);
size_t pos = truth.find(del);
truth.erase(pos, pos + del.size());
return 0;
}
void* thread2(void* data)
{... | Fix non-const literal string warning with g++ 4.3. | Fix non-const literal string warning with g++ 4.3.
* tests/libport/pthread.cc: Here.
| C++ | bsd-3-clause | aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport |
ec041a82da2c04556a09c5e62d55f35c99aafdf3 | source/host/desktop_agent_entry_point.cc | source/host/desktop_agent_entry_point.cc | //
// Aspia Project
// Copyright (C) 2016-2022 Dmitry Chapyshev <dmitry@aspia.ru>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) an... | //
// Aspia Project
// Copyright (C) 2016-2022 Dmitry Chapyshev <dmitry@aspia.ru>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) an... | Fix host building in Linux (part 15/x). | Fix host building in Linux (part 15/x).
| C++ | mpl-2.0 | aspia-org/remote-desktop,aspia-org/remote-desktop |
01b0cfaf653eead65aa1eeab3dcb4f2500c91385 | test/SemaCXX/warn-missing-noreturn.cpp | test/SemaCXX/warn-missing-noreturn.cpp | // RUN: %clang_cc1 -fsyntax-only -verify %s -Wmissing-noreturn
void f() __attribute__((noreturn));
template<typename T> void g(T) { // expected-warning {{function could be attribute 'noreturn'}}
f();
}
template void g<int>(int); // expected-note {{in instantiation of function template specialization 'g<int>' reques... | // RUN: %clang_cc1 -fsyntax-only -verify %s -Wmissing-noreturn
void f() __attribute__((noreturn));
template<typename T> void g(T) { // expected-warning {{function could be attribute 'noreturn'}}
f();
}
template void g<int>(int); // expected-note {{in instantiation of function template specialization 'g<int>' reques... | Add test case for <rdar://problem/7880658>. | Add test case for <rdar://problem/7880658>.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@103701 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... |
ee8a72f09fcadaaccd8df5e72fbd6afd81271082 | Dev/Cpp/Viewer/Utils/Logger.cpp | Dev/Cpp/Viewer/Utils/Logger.cpp | #include "Logger.h"
#include <Effekseer.h>
#include <filesystem>
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/spdlog.h>
namespace Effekseer::Tool
{
void Logger::SetFileLogger(const char16_t* path)
{
spdlog::flush_on(spdlog::level::trace);
spdlog::set_level(spdlog::level::trace);
spdlog::trace("Begin... | #include "Logger.h"
#include <Effekseer.h>
#if defined(_WIN32)
#include <filesystem>
#endif
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/spdlog.h>
namespace Effekseer::Tool
{
void Logger::SetFileLogger(const char16_t* path)
{
spdlog::flush_on(spdlog::level::trace);
spdlog::set_level(spdlog::level::tr... | Add ifdef to compile on mac | Add ifdef to compile on mac
| C++ | mit | effekseer/Effekseer,effekseer/Effekseer,effekseer/Effekseer,effekseer/Effekseer,effekseer/Effekseer,effekseer/Effekseer,effekseer/Effekseer |
9e805906ec1ba090bb6aebe630458ff817aaf995 | test/CXX/dcl.dcl/dcl.link/p7-2.cpp | test/CXX/dcl.dcl/dcl.link/p7-2.cpp | // RUN: %clang_cc1 -ast-print -o - %s | FileCheck %s
extern "C" void f(void);
// CHECK: extern "C" void f()
extern "C" void v;
// CHECK: extern "C" void v
| // RUN: %clang_cc1 -ast-print -o - %s | FileCheck %s
extern "C" int f(void);
// CHECK: extern "C" int f()
extern "C" int v;
// CHECK: extern "C" int v
| Replace void with int to make this a valid C++ file. | Replace void with int to make this a valid C++ file.
The test was passing because clang would still print the ast before exiting
with an error. Since that didn't seem to be the intent of the test, I change
the test instead of adding 'not' to the command line.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@18563... | C++ | apache-2.0 | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-cl... |
5f6e7e3ead210da157860aa431037e2e940f3a78 | src/Test/test_qtcore_main.cpp | src/Test/test_qtcore_main.cpp | // Copyright (c) 2021 The Orbit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <gtest/gtest.h>
#include <QCoreApplication>
#include <cstdio>
#include <optional>
namespace {
// QCoreApplication objects needs to be on the s... | // Copyright (c) 2021 The Orbit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <gtest/gtest.h>
#include <QCoreApplication>
#include <cstdio>
int main(int argc, char* argv[]) {
printf("Running main() from %s\n", __FILE__... | Simplify the TestQTCore main function | Simplify the TestQTCore main function
Since QCoreApplication does not require a UI context we don't need to do
this extra dance with constructing the object as late as possible.
This commit simplifies the main function by just putting the
QCoreApplication object on the stack - each time.
| C++ | bsd-2-clause | google/orbit,google/orbit,google/orbit,google/orbit |
03bbd9929378a602788499d0dba2bb4319617fbb | searchlib/src/vespa/searchlib/features/tensor_attribute_executor.cpp | searchlib/src/vespa/searchlib/features/tensor_attribute_executor.cpp | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "tensor_attribute_executor.h"
#include <vespa/searchlib/tensor/i_tensor_attribute.h>
#include <vespa/searchlib/tensor/direct_tensor_attribute.h>
namespace search {
namespace features {
Tens... | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "tensor_attribute_executor.h"
#include <vespa/searchlib/tensor/i_tensor_attribute.h>
namespace search {
namespace features {
TensorAttributeExecutor::
TensorAttributeExecutor(const search::... | Revert "use direct access to tensor when possible" | Revert "use direct access to tensor when possible"
(this is now handled by its own executor)
This reverts commit 5d52e67fb5222b65201204786785d62d8655de39.
| C++ | apache-2.0 | vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa |
cb2440b7dc4321762ce91466b9102b923b236ccf | test/SemaTemplate/default-expr-arguments-3.cpp | test/SemaTemplate/default-expr-arguments-3.cpp | // RUN: %clang_cc1 -std=c++14 -emit-llvm -disable-llvm-optzns -verify %s
// expected-no-diagnostics
namespace PR28795 {
template<typename T>
void func() {
enum class foo { a, b };
auto bar = [](foo f = foo::a) { return f; };
bar();
}
void foo() {
func<int>();
}
}
// Template struct case:
te... | // RUN: %clang_cc1 -std=c++14 -emit-llvm -o - %s
// expected-no-diagnostics
namespace PR28795 {
template<typename T>
void func() {
enum class foo { a, b };
auto bar = [](foo f = foo::a) { return f; };
bar();
}
void foo() {
func<int>();
}
}
// Template struct case:
template <class T> struct ... | Remove "-disable-llvm-optzns -verify" from the RUN line. | Remove "-disable-llvm-optzns -verify" from the RUN line.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@289919 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 652c9fe88f966515fae0aaaa3d5bc91206c17d15)
| C++ | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang |
185cf3d9524300031804bd428ba31175df569c10 | tools/firmware-update/UsbSession.cpp | tools/firmware-update/UsbSession.cpp | /*
* Copyright 2014 The Imaging Source Europe GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... | /*
* Copyright 2014 The Imaging Source Europe GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... | Fix libusb deprecated warning by switching to libusb_set_option | Fix libusb deprecated warning by switching to libusb_set_option
| C++ | apache-2.0 | TheImagingSource/tiscamera,TheImagingSource/tiscamera,TheImagingSource/tiscamera,TheImagingSource/tiscamera |
6261b0f2451a83f95b130b85a145be87e0ead2da | TestUnits/UnitTests.cpp | TestUnits/UnitTests.cpp |
#define CATCH_CONFIG_MAIN
#include <catch.hpp>
#include <ionConfig.h>
#ifdef ION_CONFIG_WINDOWS
class DebugOutBuffer : public std::stringbuf
{
public:
virtual int sync()
{
OutputDebugString(str().c_str());
str("");
return 0;
}
};
namespace Catch
{
std::ostream buffer(new DebugO... |
#define CATCH_CONFIG_MAIN
#include <catch.hpp>
#include <ionConfig.h>
#ifdef ION_CONFIG_WINDOWS
class DebugOutBuffer : public std::stringbuf
{
public:
virtual int sync()
{
OutputDebugString(str().c_str());
str("");
return 0;
}
};
namespace Catch
{
std::ostream buffer(new DebugO... | Fix *nix build, don't actually need these definitions | [TestUnits] Fix *nix build, don't actually need these definitions
| C++ | mit | iondune/ionEngine,iondune/ionEngine |
5d98497d0b278a7a92cb174b208069672d830c9b | test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter01.pass.cpp | test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/pointer_deleter01.pass.cpp | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... | Add a test for uniqueptr having either NULL and nullptr | Add a test for uniqueptr having either NULL and nullptr
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@269665 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
62143bd440d4bbaf3320933766afc745d8448527 | main.cpp | main.cpp | // Copyright 2011 Branan Purvine-Riley and Adam Johnson
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... | // Copyright 2011 Branan Purvine-Riley and Adam Johnson
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... | Make initial Pipeline instance a shared_ptr | Make initial Pipeline instance a shared_ptr
| C++ | apache-2.0 | senseproject/SensEngine,senseproject/SensEngine,senseproject/SensEngine |
41a00d9279529ca7c5b98958eb39f53fbbd981ed | tests/test-getusername.cpp | tests/test-getusername.cpp | #include <string>
#include <vector>
#include <unistd.h>
#include <gtest/gtest.h>
#include <scxcorelib/scxstrencodingconv.h>
#include "getusername.h"
using std::string;
using std::vector;
using SCXCoreLib::Utf16leToUtf8;
TEST(GetUserName,simple)
{
// allocate a WCHAR_T buffer to receive username
DWORD lpnSize = 64;
... | #include <string>
#include <vector>
#include <unistd.h>
#include <gtest/gtest.h>
#include <scxcorelib/scxstrencodingconv.h>
#include "getusername.h"
using std::string;
using std::vector;
using SCXCoreLib::Utf16leToUtf8;
TEST(GetUserName,simple)
{
// allocate a WCHAR_T buffer to receive username
DWORD lpnSize = 64;
... | Clarify lpBuffer layout in GetUserName unit test | Clarify lpBuffer layout in GetUserName unit test
| C++ | mit | bingbing8/PowerShell,kmosher/PowerShell,bingbing8/PowerShell,daxian-dbw/PowerShell,TravisEz13/PowerShell,bmanikm/PowerShell,jsoref/PowerShell,KarolKaczmarek/PowerShell,TravisEz13/PowerShell,bmanikm/PowerShell,TravisEz13/PowerShell,bmanikm/PowerShell,daxian-dbw/PowerShell,bingbing8/PowerShell,kmosher/PowerShell,KarolKac... |
e24be46358e5b4a2be3d6c27ceb95463524d0cea | src/Editor/GUI/SettingsWindow.cpp | src/Editor/GUI/SettingsWindow.cpp | #include "SettingsWindow.hpp"
#include <imgui.h>
#include "../ImGui/Theme.hpp"
using namespace GUI;
SettingsWindow::SettingsWindow() {
themes.push_back("Default");
}
void SettingsWindow::Show() {
if (ImGui::Begin("Settings", &visible)) {
// Show drop down list to select theme.
if (dropDownIt... | #include "SettingsWindow.hpp"
#include <imgui.h>
#include "../ImGui/Theme.hpp"
using namespace GUI;
SettingsWindow::SettingsWindow() {
themes.push_back("Default");
}
void SettingsWindow::Show() {
if (ImGui::Begin("Settings", &visible)) {
// Show drop down list to select theme.
if (dropDownIt... | Add cloned theme to theme list | Add cloned theme to theme list
| C++ | mit | Chainsawkitten/LargeGameProjectEngine,Chainsawkitten/HymnToBeauty,Chainsawkitten/LargeGameProjectEngine,Chainsawkitten/HymnToBeauty |
35f94e3fe25ac97f696bc2a49edf1402d85fdb18 | src/Engine/Component/Material.cpp | src/Engine/Component/Material.cpp | #include "Material.hpp"
#include "../Manager/Managers.hpp"
#include "../Manager/ResourceManager.hpp"
#include "../Texture/TextureAsset.hpp"
#include "../Hymn.hpp"
using namespace Component;
Material::Material(Entity* entity) : SuperComponent(entity) {
diffuse = Hymn().defaultDiffuse;
normal = Hymn().defaultN... | #include "Material.hpp"
#include "../Manager/Managers.hpp"
#include "../Manager/ResourceManager.hpp"
#include "../Texture/TextureAsset.hpp"
#include "../Hymn.hpp"
using namespace Component;
Material::Material(Entity* entity) : SuperComponent(entity) {
diffuse = Hymn().defaultDiffuse;
normal = Hymn().defaultN... | Fix loading unset material component | Fix loading unset material component
| C++ | mit | Chainsawkitten/LargeGameProjectEngine,Chainsawkitten/LargeGameProjectEngine |
04219f56956b789f6817b52de1097882d6a9eed2 | cpp/directory_entry.cc | cpp/directory_entry.cc | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ppapi/cpp/directory_entry.h"
#include "ppapi/cpp/module.h"
namespace pp {
DirectoryEntry::DirectoryEntry() {
memset(&data_, 0, sizeof(d... | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ppapi/cpp/directory_entry.h"
#include <string.h>
#include "ppapi/cpp/module.h"
namespace pp {
DirectoryEntry::DirectoryEntry() {
memse... | Fix the linux build by adding a string.h include. | Fix the linux build by adding a string.h include.
TBR=brettw
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2836024 | C++ | bsd-3-clause | iofcas/ppapi,kaijajan/ppapi,humanai/ppapi,iofcas/ppapi,Gitzk/ppapi,jmnjmn/ppapi,Gitzk/ppapi,melchi45/ppapi,kaijajan/ppapi,lio972/ppapi,iofcas/ppapi,iofcas/ppapi,iofcas/ppapi,macressler/ppapi,Gitzk/ppapi,humanai/ppapi,jmnjmn/ppapi,macressler/ppapi,jmnjmn/ppapi,kaijajan/ppapi,LinRaise/ppapi,johnnnylm/ppapi,lio972/ppapi,I... |
4819316d6156d49db782f9343121ed707adad95f | test/sanitizer_common/TestCases/Linux/sanitizer_set_death_callback_test.cc | test/sanitizer_common/TestCases/Linux/sanitizer_set_death_callback_test.cc | // RUN: %clangxx -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
#include <sanitizer/common_interface_defs.h>
#include <stdio.h>
volatile char *zero = 0;
void Death() {
fprintf(stderr, "DEATH CALLBACK EXECUTED\n");
}
// CHECK: DEATH CALLBACK EXECUTED
char global;
volatile char *sink;
__attribute__((noinline))
vo... | // RUN: %clangxx -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
// REQUIRES: stable-runtime
#include <sanitizer/common_interface_defs.h>
#include <stdio.h>
volatile char *zero = 0;
void Death() {
fprintf(stderr, "DEATH CALLBACK EXECUTED\n");
}
// CHECK: DEATH CALLBACK EXECUTED
char global;
volatile char *sink;
... | Mark death callback as unstable while we investigate the cause in AArch64 | [LSAN] Mark death callback as unstable while we investigate the cause in AArch64
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@249398 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
7f1f4bb470df466bc1ebabd7337d6e869a8b02ec | tests/global_middlewares.cc | tests/global_middlewares.cc | #include <iostream>
#include <silicon/backends/mhd_serve.hh>
#include <silicon/api.hh>
using namespace sl;
struct request_logger
{
request_logger(std::string x) : xx(x)
{
std::cout << "Request start!" << std::endl;
}
~request_logger()
{
std::cout << "Request end! " << xx << std::endl;
}
std::s... | #include <iostream>
#include <silicon/backends/mhd_serve.hh>
#include <silicon/api.hh>
using namespace sl;
struct request_logger
{
request_logger()
{
time = get_time();
std::cout << "Request start!" << std::endl;
}
~request_logger()
{
std::cout << "Request took " << (get_time() - time) << " mic... | Improve the global middelware test. | Improve the global middelware test.
| C++ | mit | byzhang/silicon,byzhang/silicon,matt-42/silicon,matt-42/silicon,byzhang/silicon,gale320/silicon,gale320/silicon,matt-42/silicon,gale320/silicon |
07cf4ec21a1f65b27ba626aef18cc8f811f65731 | Tagger/word.cpp | Tagger/word.cpp | /**
* word.cpp
* Copyright (C) 2015 Tony Lim <atomictheorist@gmail.com>
*
* Distributed under terms of the MIT license.
*/
#include "word.h"
namespace NLP
{
Word::Word(const Token &other, set<WordType> tags, set<string> defs)
: Token::Token(other), mTypes(tags), mDefinitions(defs)
{
}
Word::Word(const Word ... | /**
* word.cpp
* Copyright (C) 2015 Tony Lim <atomictheorist@gmail.com>
*
* Distributed under terms of the MIT license.
*/
#include "word.h"
namespace NLP
{
Word::Word() : Token()
{
}
Word::Word(const Token &other, set<WordType> tags, set<string> defs)
: Token::Token(other), mTypes(tags), mDefinitions(defs)... | Add empty constructor for Word object | Add empty constructor for Word object
| C++ | mit | NLP/Parser |
0ec573f7a71d17d3560d7de3ea3ecac557c7a75e | src/run_queueable.cpp | src/run_queueable.cpp | #include <map>
#include <stdio.h>
#include <string>
#include <sys/utsname.h>
#include "tcp.h"
#include "udss.h"
#include "udds.h"
int main()
{
struct utsname name;
std::map<std::string, std::string> options;
options["port"] = "10000";
options["items"] = "1000000";
options["max_msg_size"] = "4096"... | #include <map>
#include <stdio.h>
#include <string>
#include <sys/utsname.h>
#include "tcp.h"
#include "udss.h"
#include "udds.h"
int main()
{
struct utsname name;
std::map<std::string, std::string> options;
options["port"] = "10000";
options["items"] = "1000000";
options["max_msg_size"] = "4096"... | Change 'tests' to 'test_run' in output | Change 'tests' to 'test_run' in output
| C++ | mit | adamonduty/queueable |
8209115d105fac108c3d8828a5250842b1940ede | src/framework/gamecontroller.cc | src/framework/gamecontroller.cc | #include <cstring>
#include "framework/gamecontroller.hh"
using namespace Framework;
GameController::GameController()
: m_keyboardState(NULL)
{
}
void GameController::SetKeyboardState(ReadingKeyboardState *state)
{
m_keyboardState = state;
}
ReadingKeyboardState *GameController::GetKeyboardState(... | #include <cstddef>
#include "framework/gamecontroller.hh"
using namespace Framework;
GameController::GameController()
: m_keyboardState(NULL)
{
}
void GameController::SetKeyboardState(ReadingKeyboardState *state)
{
m_keyboardState = state;
}
ReadingKeyboardState *GameController::GetKeyboardState(... | Use slightly more appropriate header | Use slightly more appropriate header
| C++ | mit | Frinter/fire-frame,Frinter/fire-frame |
536dc83c58e2e90deb959cc077235c66cbf6c789 | src/core/SkRefCnt.cpp | src/core/SkRefCnt.cpp | /*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkRefCnt.h"
#include "SkWeakRefCnt.h"
SK_DEFINE_INST_COUNT(SkRefCnt)
SK_DEFINE_INST_COUNT(SkWeakRefCnt)
SkRefCnt::SkRefCnt(const SkRefCnt&) { }
SkRefCnt::operato... | /*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkRefCnt.h"
#include "SkWeakRefCnt.h"
SK_DEFINE_INST_COUNT(SkRefCnt)
SK_DEFINE_INST_COUNT(SkWeakRefCnt)
#ifdef SK_BUILD_FOR_WIN
SkRefCnt::SkRefCnt(const SkRefCnt&... | Build fix fo windows only | Build fix fo windows only
Build fix
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@11828 2bbb7eff-a529-9590-31e7-b0007b416f81
| C++ | bsd-3-clause | vvuk/skia,Tesla-Redux/android_external_skia,Fusion-Rom/android_external_skia,TeamBliss-LP/android_external_skia,F-AOSP/platform_external_skia,byterom/android_external_skia,AsteroidOS/android_external_skia,scroggo/skia,chenlian2015/skia_from_google,invisiblek/android_external_skia,invisiblek/android_external_skia,w3nd1g... |
1892ebbdd9920e0a1baf2b58a6f23e307d24c198 | src/graphics/qimage_drawer.cpp | src/graphics/qimage_drawer.cpp | #include "./qimage_drawer.h"
#include <QPainter>
#include <vector>
namespace Graphics
{
QImageDrawer::QImageDrawer(int width, int height)
{
image = std::make_shared<QImage>(width, height, QImage::Format_Grayscale8);
}
void QImageDrawer::drawElementVector(std::vector<float> positions)
{
QPainter painter;
painte... | #include "./qimage_drawer.h"
#include <QPainter>
#include <vector>
namespace Graphics
{
QImageDrawer::QImageDrawer(int width, int height)
{
image = std::make_shared<QImage>(width, height, QImage::Format_Grayscale8);
}
void QImageDrawer::drawElementVector(std::vector<float> positions)
{
QPainter painter;
painte... | Use drawing of convex polygons in QImageDrawer. | Use drawing of convex polygons in QImageDrawer.
| C++ | mit | Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller |
640daf2de84188b6b8aec7c47aa926e52b4d6731 | stats.cpp | stats.cpp | #include "stats.h"
void Stats::update(ReadType type, bool paired)
{
auto it = reads.find(type);
if (it == reads.end()) {
reads[type] = 1;
} else {
++it->second;
}
++complete;
if (type == ReadType::ok) {
if (paired) {
++pe;
} else {
++se;
... | #include "stats.h"
void Stats::update(ReadType type, bool paired)
{
auto it = reads.find(type);
if (it == reads.end()) {
reads[type] = 1;
} else {
++it->second;
}
++complete;
if (type == ReadType::ok) {
if (paired) {
++pe;
} else {
++se;
... | Fix output error for fraction field. | Fix output error for fraction field.
| C++ | bsd-3-clause | hjanime/Cookiecutter,hjanime/Cookiecutter,gtamazian/Cookiecutter,gtamazian/Cookiecutter,hjanime/Cookiecutter,gtamazian/Cookiecutter,gtamazian/Cookiecutter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.