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 |
|---|---|---|---|---|---|---|---|---|---|
ab055ce915bd78ea8c8f46d25200adcbe5ef5565 | cpr/util.cpp | cpr/util.cpp | #include "util.h"
#include <sstream>
#include <vector>
Header cpr::util::parseHeader(std::string headers) {
Header header;
std::vector<std::string> lines;
std::istringstream stream(headers);
{
std::string line;
while (std::getline(stream, line, '\n')) {
lines.push_back(lin... | #include "util.h"
#include <sstream>
#include <vector>
Header cpr::util::parseHeader(std::string headers) {
Header header;
std::vector<std::string> lines;
std::istringstream stream(headers);
{
std::string line;
while (std::getline(stream, line, '\n')) {
lines.push_back(lin... | Use a for each loop | Use a for each loop
| C++ | mit | smiley/cpr,msuvajac/cpr,SuperV1234/cpr,whoshuu/cpr,skystrife/cpr,aquilleph/cpr,skystrife/cpr,msuvajac/cpr,SuperV1234/cpr,whoshuu/cpr,gruzovator/cpr,SuperV1234/cpr,skystrife/cpr,smiley/cpr,aquilleph/cpr,whoshuu/cpr,gruzovator/cpr,msuvajac/cpr |
d0db8914f79b8a206f1637f4398fa4b4a4cc23a0 | xs/src/libslic3r/GUI/GUI.cpp | xs/src/libslic3r/GUI/GUI.cpp | #include "GUI.hpp"
#if __APPLE__
#import <IOKit/pwr_mgt/IOPMLib.h>
#elif _WIN32
#include <Windows.h>
#pragma comment(lib, "user32.lib")
#endif
namespace Slic3r { namespace GUI {
IOPMAssertionID assertionID;
void
disable_screensaver()
{
#if __APPLE__
CFStringRef reasonForActivity = CFSTR("Slic3r");
IORet... | #include "GUI.hpp"
#if __APPLE__
#import <IOKit/pwr_mgt/IOPMLib.h>
#elif _WIN32
#include <Windows.h>
#pragma comment(lib, "user32.lib")
#endif
namespace Slic3r { namespace GUI {
#if __APPLE__
IOPMAssertionID assertionID;
#endif
void
disable_screensaver()
{
#if __APPLE__
CFStringRef reasonForActivity = CFSTR... | Fix a compilation error on Win32 | Fix a compilation error on Win32
| C++ | agpl-3.0 | alexrj/Slic3r,prusa3d/Slic3r,pieis2pi/Slic3r,curieos/Slic3r,prusa3d/Slic3r,xoan/Slic3r,prusa3d/Slic3r,prusa3d/Slic3r,platsch/Slic3r,curieos/Slic3r,curieos/Slic3r,tmotl/Slic3r,lordofhyphens/Slic3r,pieis2pi/Slic3r,lordofhyphens/Slic3r,mcilhargey/Slic3r,platsch/Slic3r,platsch/Slic3r,tmotl/Slic3r,mcilhargey/Slic3r,alexrj/S... |
1d753c244dfda8312b9df74b58debfd844a7f7d6 | src/DP/Fibonanci.cpp | src/DP/Fibonanci.cpp | #include <cstdlib>
#include <iostream>
using namespace std;
int const n = 50;
long long save[n + 1];
long long fibonanci(int n){
if (n <= 1)
return 1;
if (save[n])
return save[n];
return save[n] = fibonanci(n - 2) + fibonanci(n - 1);
}
/*
// CAUTION: This code will take too much time
int fibonanci(int n)... | #include <cstdlib>
#include <iostream>
using namespace std;
int const n = 50;
long long save[n + 1];
long long fibonanci_dp(int n){
if (n <= 0) return 0;
if (n <= 2) return 1;
if (save[n])
return save[n];
return save[n] = fibonanci_dp(n - 2) + fibonanci_dp(n - 1);
}
/*
// CAUTION: This code will take too ... | Add fibonanci_loop method & Fix bug | Add fibonanci_loop method & Fix bug
- Add fibonanci_loop method
- Fix bug of F(0) =0 | C++ | mit | shivisuper/Cubes,OmarElGabry/Cubes |
2ffe0847897d78e161d712f48f48f89727418222 | main.cpp | main.cpp | #include "compress.hpp"
#include "decompress.hpp"
#include<iostream>
#include<fstream>
void printUsage() {
std::cout << "Give option\n";
}
const std::string COMPRESS_COMMAND = "c";
const std::string DECOMPRESS_COMMAND = "d";
int main(int argc, char** argv) {
if(argc < 2) {
printUsage();
return 1;
}
std::is... | #include "compress.hpp"
#include "decompress.hpp"
#include<iostream>
#include<fstream>
void printUsage() {
std::cout << "Give option\n";
}
const std::string COMPRESS_COMMAND = "c";
const std::string DECOMPRESS_COMMAND = "d";
const std::string ARCHIVE_COMMAND = "a";
const std::string EXTRACT_COMMAND = "x";
int main... | Prepare to add archive and extract | Prepare to add archive and extract
| C++ | mit | cuklev/huffman-archiver-cpp,StanislavNikolov/huffman-archiver-cpp |
40d965d75defd95662f70a3ed24d99ed7fa343aa | ouzel/android/WindowAndroid.cpp | ouzel/android/WindowAndroid.cpp | // Copyright (C) 2016 Elviss Strazdins
// This file is part of the Ouzel engine.
#include "WindowAndroid.h"
namespace ouzel
{
WindowAndroid::WindowAndroid(const Size2& pSize, bool pResizable, bool pFullscreen, uint32_t pSampleCount, const std::string& pTitle):
Window(pSize, pResizable, pFullscreen, pSampl... | // Copyright (C) 2016 Elviss Strazdins
// This file is part of the Ouzel engine.
#include "WindowAndroid.h"
#include "Engine.h"
#include "opengl/RendererOGL.h"
namespace ouzel
{
WindowAndroid::WindowAndroid(const Size2& pSize, bool pResizable, bool pFullscreen, uint32_t pSampleCount, const std::string& pTitle):
... | Set OpenGL ES version to 2 on Android | Set OpenGL ES version to 2 on Android
| C++ | unlicense | elvman/ouzel,Hotspotmar/ouzel,Hotspotmar/ouzel,elvman/ouzel,elnormous/ouzel,Hotspotmar/ouzel,elnormous/ouzel,elnormous/ouzel |
30dd43200bc4cd8ed010b56e55eaa893de80e576 | bindings/python/mapnik_text_symbolizer.cpp | bindings/python/mapnik_text_symbolizer.cpp | /* This file is part of python_mapnik (c++/python mapping toolkit)
* Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon
*
* Mapnik 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 2
* o... | /* This file is part of python_mapnik (c++/python mapping toolkit)
* Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon
*
* Mapnik 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 2
* o... | Add support for halo's to TextSymbolizer(). | Add support for halo's to TextSymbolizer().
| C++ | lgpl-2.1 | tomhughes/mapnik,pramsey/mapnik,mapnik/python-mapnik,tomhughes/mapnik,mapnik/mapnik,yiqingj/work,mapycz/python-mapnik,qianwenming/mapnik,whuaegeanse/mapnik,naturalatlas/mapnik,manz/python-mapnik,mapycz/python-mapnik,Airphrame/mapnik,Airphrame/mapnik,Airphrame/mapnik,tomhughes/python-mapnik,mbrukman/mapnik,mapycz/mapnik... |
34022e3d5daa2eefc36417f0e33ab4e323ac9c26 | HedgeEdit/src/main.cpp | HedgeEdit/src/main.cpp | #include "mainwindow.h"
#include <QApplication>
#include <QStyleFactory> // TODO
int main(int argc, char *argv[])
{
using namespace HedgeEdit;
QApplication a(argc, argv);
QApplication::setStyle(QStyleFactory::create("WindowsVista"));
UI::MainWindow w;
w.show();
return a.exec();
}
| #include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
using namespace HedgeEdit;
QApplication a(argc, argv);
UI::MainWindow w;
w.show();
return a.exec();
}
| Test to see if AppVeyor styles work when not explicitly set | Test to see if AppVeyor styles work when not explicitly set
| C++ | mit | Radfordhound/HedgeLib,Radfordhound/HedgeLib |
e5d252e36cbeb2499714c7f8346d8f51b02505f1 | Wangscape/tilegen/alpha/CalculatorBase.cpp | Wangscape/tilegen/alpha/CalculatorBase.cpp | #include "CalculatorBase.h"
#include <algorithm>
#include <numeric>
#include "common.h"
namespace tilegen
{
namespace alpha
{
CalculatorBase::CalculatorBase():
mAlphas((int)CORNERS)
{
zeroAlphas();
}
void CalculatorBase::zeroAlphas()
{
for (auto& alpha : mAlphas)
alpha = 0;
}
sf::Uint8 & Calcula... | #include "CalculatorBase.h"
#include <algorithm>
#include <cmath>
#include "common.h"
namespace tilegen
{
namespace alpha
{
CalculatorBase::CalculatorBase():
mAlphas((int)CORNERS)
{
zeroAlphas();
}
void CalculatorBase::zeroAlphas()
{
for (auto& alpha : mAlphas)
alpha = 0;
}
sf::Uint8 & Calculato... | Use correct header and namespace for isfinite | Use correct header and namespace for isfinite
| C++ | mit | Wangscape/Wangscape,Wangscape/Wangscape,Wangscape/Wangscape |
a3e6c7338559571f598759613e8a52d4d0769833 | LinuxCookedProcessor.cpp | LinuxCookedProcessor.cpp | #include <netinet/ether.h>
#include <netinet/ip.h>
#include "sll.h"
#include "IPv4Processor.h"
#include "LinuxCookedProcessor.h"
void LinuxCookedProcessor::process(const struct pcap_pkthdr *pkthdr, const u_char *packet, const vector<NetData> &netData) {
struct ip* ipHeader;
struct ether_header* etherHeader =... | #include <netinet/ether.h>
#include <netinet/ip.h>
#include "sll.h"
#include "IPv4Processor.h"
#include "LinuxCookedProcessor.h"
void LinuxCookedProcessor::process(const struct pcap_pkthdr *pkthdr, const u_char *packet, const vector<NetData> &netData) {
struct ip* ipHeader;
struct sll_header* linuxCookedHead... | Fix linux cooked header ether type | Fix linux cooked header ether type
| C++ | mit | zulhilmizainuddin/nettomon,zulhilmizainuddin/nettomon,zulhilmizainuddin/nettomon,zulhilmizainuddin/nettomon |
b0bdce16a10dd5f8c651331a4de8d5053cf28bb5 | 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 | Crystalnix/house-of-life-chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,ropik/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,gavinp/chromium,ropik/... |
827ca986329f6d6a9f85f2d9b31adfeb80c0c6d5 | src/Window.cpp | src/Window.cpp | // Copyright 2016 Zheng Xian Qiu
#include "framework.h"
Window::Window() {
}
// Display Information
int Window::DISPLAY_INDEX = 0;
bool Window::displayModeLoaded = false;
SDL_DisplayMode Window::displayMode;
int Window::getDisplayWidth() {
loadDisplayMode();
return displayMode.w;
}
int Window::getDisplayHeigh... | // Copyright 2016 Zheng Xian Qiu
#include "framework.h"
Window::Window() {
}
// Display Information
int Window::DISPLAY_INDEX = 0;
bool Window::displayModeLoaded = false;
SDL_DisplayMode Window::displayMode;
int Window::getDisplayWidth() {
loadDisplayMode();
return displayMode.w;
}
int Window::getDisplayHeigh... | Switch create window message from debug to info | Switch create window message from debug to info
| C++ | apache-2.0 | elct9620/seeker,elct9620/seeker,elct9620/seeker |
03382453a0256e18633292f21bc51cd8b21fb2fe | src/Common/DebugAndroid.cpp | src/Common/DebugAndroid.cpp | #include "DebugAndroid.hpp"
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <cutils/properties.h>
void AndroidEnterDebugger()
{
ALOGE(__FUNCTION__);
#ifndef NDEBUG
static volatile int * const makefault = nullptr;
char value[PROPERTY_VALUE_MAX];
property_get("debug.db.uid", valu... | #include "DebugAndroid.hpp"
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <cutils/properties.h>
void AndroidEnterDebugger()
{
ALOGE(__FUNCTION__);
#ifndef NDEBUG
static volatile int * const makefault = nullptr;
char value[PROPERTY_VALUE_MAX];
property_get("debug.db.uid", valu... | Improve advice for attaching the debugger | Improve advice for attaching the debugger
Change-Id: I6ca5697a8b672a1e20bcb7999cf4d9ba544f9558
Reviewed-on: https://swiftshader-review.googlesource.com/3117
Reviewed-by: Nicolas Capens <0612353e1fcebbfd4b302d9337447ca0cdfa9122@google.com>
Tested-by: Greg Hartman <1491e78df1ea2169b62fa2ceaf1a32538792aab8@google.com>
| C++ | apache-2.0 | bkaradzic/SwiftShader,bkaradzic/SwiftShader,google/swiftshader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,google/swiftshader,google/swiftshader |
21dfb2dcdbc1540ff17caa6c81c9443dfcbb5716 | src/plugins/positionprovider/geoclue/GeoCute/MasterClient.cpp | src/plugins/positionprovider/geoclue/GeoCute/MasterClient.cpp | #include "MasterClient_p.h"
#include <QtCore/QString>
#include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusReply>
#include <QtDBus/QDBusObjectPath>
#include "PositionProvider.h"
using namespace GeoCute;
static QString createClientPath() {
SimpleDBusInterface masterInterface(serviceName, masterPathName,
... | #include "MasterClient_p.h"
#include <QtCore/QString>
#include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusReply>
#include <QtDBus/QDBusObjectPath>
#include "PositionProvider.h"
using namespace GeoCute;
static QString createClientPath() {
SimpleDBusInterface masterInterface(serviceName, masterPathName,
... | Make geoclue-support more robust to missing master, second attempt | Make geoclue-support more robust to missing master, second attempt
svn path=/branches/marble/marble-gsoc-2009/; revision=983224
| C++ | lgpl-2.1 | utkuaydin/marble,oberluz/marble,AndreiDuma/marble,utkuaydin/marble,Earthwings/marble,adraghici/marble,David-Gil/marble-dev,oberluz/marble,tzapzoor/marble,rku/marble,Earthwings/marble,tzapzoor/marble,probonopd/marble,quannt24/marble,quannt24/marble,tzapzoor/marble,quannt24/marble,adraghici/marble,tucnak/marble,utkuaydin... |
a85a8f5a78defc7be74990ad1892f381a054c0c6 | Devices/G30/Device.cpp | Devices/G30/Device.cpp | #include "Device.h"
#include "../../Drivers/SPIDisplay/SPIDisplay.h"
#include "../../Drivers/DevicesInterop/GHIElectronics_TinyCLR_Devices.h"
#include "../../Drivers/DevicesInterop/GHIElectronics_TinyCLR_Devices_GHIElectronics_TinyCLR_Devices_Interop.h"
void STM32F4_Startup_OnSoftResetDevice(const TinyCLR_Api_Provider... | #include "Device.h"
#include "../../Drivers/SPIDisplay/SPIDisplay.h"
#include "../../Drivers/DevicesInterop/GHIElectronics_TinyCLR_Devices.h"
#include "../../Drivers/DevicesInterop/GHIElectronics_TinyCLR_Devices_GHIElectronics_TinyCLR_Devices_Interop.h"
void STM32F4_Startup_OnSoftResetDevice(const TinyCLR_Api_Manager*... | Update Provider to Manager from clean branch | Update Provider to Manager from clean branch
| C++ | apache-2.0 | matsujirushi/TinyCLR-Ports,matsujirushi/TinyCLR-Ports |
2791cb26785e8e290e38de724933a501f589bf06 | examples/helloworld/helloworld.cpp | examples/helloworld/helloworld.cpp | #include "helloworld.h"
#include <QCoreApplication>
#include <QDebug>
#include <qhttpserver.h>
#include <qhttprequest.h>
#include <qhttpresponse.h>
Hello::Hello()
{
QHttpServer *server = new QHttpServer;
server->listen(QHostAddress::Any, 5000);
connect(server, SIGNAL(newRequest(QHttpRequest*, QHttpRespon... | #include "helloworld.h"
#include <QCoreApplication>
#include <qhttpserver.h>
#include <qhttprequest.h>
#include <qhttpresponse.h>
Hello::Hello()
{
QHttpServer *server = new QHttpServer;
server->listen(QHostAddress::Any, 5000);
connect(server, SIGNAL(newRequest(QHttpRequest*, QHttpResponse*)),
... | Remove extra stuff from simplest example | Remove extra stuff from simplest example
| C++ | mit | iptton/qhttpserver,rschroll/qhttpserver,nikhilm/qhttpserver,nikhilm/qhttpserver,rschroll/qhttpserver,arkpar/qhttpserver,iptton/qhttpserver,arkpar/qhttpserver,FreedomZZQ/qhttpserver,FreedomZZQ/qhttpserver,woboq/qhttpserver,rschroll/qhttpserver,nikhilm/qhttpserver,woboq/qhttpserver,arkpar/qhttpserver,iptton/qhttpserver,F... |
2d09ed028a626d2ebccc6d7971f8c1066a177954 | test/CodeGenCXX/member-pointer-type-convert.cpp | test/CodeGenCXX/member-pointer-type-convert.cpp | // RUN: clang-cc -emit-llvm %s -o - | FileCheck %s
struct A;
typedef int A::*param_t;
struct {
const char *name;
param_t par;
} *ptr;
// CHECK: type { i8*, i32 }
| // RUN: clang-cc -emit-llvm %s -o - | FileCheck %s
struct A;
typedef int A::*param_t;
struct {
const char *name;
param_t par;
} *ptr;
// CHECK: type { i8*, {{i..}} }
| Make test 64 bit safe. | Make test 64 bit safe.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@90452 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... |
b59a166a76f96c78f1790efbbe5b4fd339aa6d84 | test/CodeGenCXX/debug-info-atexit-stub.cpp | test/CodeGenCXX/debug-info-atexit-stub.cpp | // RUN: %clang_cc1 -emit-llvm %s -gcodeview -debug-info-kind=limited -o - | FileCheck %s
struct a {
~a();
};
template <typename b> struct c : a {
c(void (b::*)());
};
struct B {
virtual void e();
};
c<B> *d() { static c<B> f(&B::e); return &f; }
// CHECK: define internal void @"??__Ff@?1??d@@YAPEAU?$c@UB@@@@XZ@... | // RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm %s -gcodeview -debug-info-kind=limited -o - | FileCheck %s
struct a {
~a();
};
template <typename b> struct c : a {
c(void (b::*)());
};
struct B {
virtual void e();
};
c<B> *d() { static c<B> f(&B::e); return &f; }
// CHECK: define internal void @"??__F... | Add triple to new test to try to pacify bots | Add triple to new test to try to pacify bots
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@369474 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang |
eb5c6aef60de34a7f29c61e87f12a34d0fc8c50f | src/state_machine.cpp | src/state_machine.cpp | #include "state_machine.hpp"
namespace kg {
void StateMachine::startState(StateRef newState, bool isReplacing) {
if (isReplacing && !_states.empty()) {
_states.pop();
}
_states.push(std::move(newState));
_states.top()->start();
}
void StateMachine::exitState() ... | #include "state_machine.hpp"
namespace kg {
void StateMachine::startState(StateRef newState, bool isReplacing) {
if (isReplacing && !_states.empty()) {
_states.pop();
}
if (!isReplacing) {
_states->top()->pause();
}
_states.push(std::move(newState))... | Call state pause method when not replacing state. | Call state pause method when not replacing state.
| C++ | mit | kiswa/SFML_Starter |
85a324f9c7644410b0b231940b2ed317fafa33ab | chrome/browser/extensions/chrome_mojo_service_registration.cc | chrome/browser/extensions/chrome_mojo_service_registration.cc | // Copyright 2015 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/chrome_mojo_service_registration.h"
#include "base/logging.h"
namespace extensions {
void RegisterChromeServicesFor... | // Copyright 2015 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/chrome_mojo_service_registration.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/logging.h"
#... | Add Media Router Mojo service to the renderer service registry. Guard access to the Media Router service using a manifest permission. | Add Media Router Mojo service to the renderer service registry.
Guard access to the Media Router service using a manifest permission.
BUG=464205
R=imcheng
Review URL: https://codereview.chromium.org/1164713003
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#332395}
| C++ | bsd-3-clause | axinging/chromium-crosswalk,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,axinging/chromium-crosswalk,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,hgl888/chromium-cross... |
29514913dd21888a6a6d5dc2a752cea7727356b2 | test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp | test/support/test.workarounds/c1xx_broken_is_trivially_copyable.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 test failure with GCC 4.9 | Fix test failure with GCC 4.9
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@302182 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
fb6703a5d072ca93dbed01405a6dfa60bb0200ee | skia/ext/paint_simplifier.cc | skia/ext/paint_simplifier.cc | // Copyright (c) 2013 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 <limits>
#include "skia/ext/paint_simplifier.h"
#include "third_party/skia/include/core/SkPaint.h"
namespace skia {
PaintSimplifier::Paint... | // Copyright (c) 2013 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 "skia/ext/paint_simplifier.h"
#include "third_party/skia/include/core/SkPaint.h"
namespace skia {
PaintSimplifier::PaintSimplifier()
: IN... | Revert 273648 "skia: Use medium filter quality in PaintSimplifier." | Revert 273648 "skia: Use medium filter quality in PaintSimplifier."
> skia: Use medium filter quality in PaintSimplifier.
>
> Preventing all bitmap filtering in the paint simplifier is a bad
> idea as it's very cache unfriendly when down-sampling due to
> requiring both the full size decoded image and the high/medium... | C++ | bsd-3-clause | dushu1203/chromium.src,dednal/chromium.src,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,Chilledheart/chromium,M4sse/chromium.src,krieger-od/nw... |
8ce550d50c154beccf20ab889d61f00ae4751a1b | src/backend/cuda/GraphicsResourceManager.cpp | src/backend/cuda/GraphicsResourceManager.cpp | /*******************************************************
* Copyright (c) 2016, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
**********************************************... | /*******************************************************
* Copyright (c) 2016, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
**********************************************... | Work around for gfx interop resource cleanup in cuda backend | Work around for gfx interop resource cleanup in cuda backend
| C++ | bsd-3-clause | umar456/arrayfire,arrayfire/arrayfire,munnybearz/arrayfire,9prady9/arrayfire,9prady9/arrayfire,arrayfire/arrayfire,9prady9/arrayfire,umar456/arrayfire,arrayfire/arrayfire,umar456/arrayfire,arrayfire/arrayfire,umar456/arrayfire,munnybearz/arrayfire,9prady9/arrayfire,munnybearz/arrayfire |
fbc375a351809acb38af1c3532bdaa5fea0a3c1f | JPetAnalysisTools/JPetAnalysisToolsTest.cpp | JPetAnalysisTools/JPetAnalysisToolsTest.cpp | #define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE JPetEventTest
#include <boost/test/unit_test.hpp>
#include "../JPetAnalysisTools/JPetAnalysisTools.h"
BOOST_AUTO_TEST_SUITE(FirstSuite)
BOOST_AUTO_TEST_CASE(constructor_getHitsOrderedByTime)
{
std::vector<JPetHit> hits(4);
hits[0].setTime(2);
hits[1].setTi... | #define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE JPetEventTest
#include <boost/test/unit_test.hpp>
#include "../JPetAnalysisTools/JPetAnalysisTools.h"
BOOST_AUTO_TEST_SUITE(FirstSuite)
BOOST_AUTO_TEST_CASE(constructor_getHitsOrderedByTime)
{
std::vector<JPetHit> hits(4);
hits[0].setTime(2);
hits[1].setTi... | Change tests in JPetAnalysisTools to use double instead of int | Change tests in JPetAnalysisTools to use double instead of int
| C++ | apache-2.0 | wkrzemien/j-pet-framework,wkrzemien/j-pet-framework,wkrzemien/j-pet-framework,wkrzemien/j-pet-framework,wkrzemien/j-pet-framework |
35c81ca426b36ca223c47d9e86e0c5e9a0d86df6 | src/third_party/CppUnitLite/SimpleString.cpp | src/third_party/CppUnitLite/SimpleString.cpp |
#include "SimpleString.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
SimpleString::SimpleString ()
: buffer(new char [1])
{
buffer [0] = '\0';
}
SimpleString::SimpleString (const char *otherBuffer)
: buffer (new char [strlen (otherBuffer) + 1])
{
strcpy (buffer, otherBuffer);
}
SimpleString::Sim... |
#include "SimpleString.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
SimpleString::SimpleString ()
: buffer(new char [1])
{
buffer [0] = '\0';
}
SimpleString::SimpleString (const char *otherBuffer)
: buffer (new char [strlen (otherBuffer) + 1])
{
strcpy (buffer, otherBuffer);
}
SimpleString::Sim... | Fix a bug found by @rperrot | Fix a bug found by @rperrot
| C++ | mpl-2.0 | openMVG/openMVG,openMVG/openMVG,openMVG/openMVG,openMVG/openMVG,openMVG/openMVG |
5998f8451548244de8cde7fab387a550e7c4497d | src/crc32c_arm64_unittest.cc | src/crc32c_arm64_unittest.cc | // Copyright 2017 The CRC32C Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "gtest/gtest.h"
#include "./crc32c_arm64.h"
#include "./crc32c_extend_unittests.h"
namespace crc3... | // Copyright 2017 The CRC32C Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "gtest/gtest.h"
#include "./crc32c_arm64.h"
#include "./crc32c_extend_unittests.h"
namespace crc3... | Replace missed instance of TEST_CASE with TEST_SUITE. | Replace missed instance of TEST_CASE with TEST_SUITE.
| C++ | bsd-3-clause | google/crc32c,google/crc32c,google/crc32c |
2c26481d636e795f31150098ea712605d33b5251 | src/benchpress.cpp | src/benchpress.cpp | //============================================================================
// Name : benchpress.cpp
// Author : Ulrik Kofoed Pedersen
// Version :
// Copyright : MIT. See LICENSE file.
// Description : Use blosc with different algorithms to compress data from
// datasets in an HDF5 f... | //============================================================================
// Name : benchpress.cpp
// Author : Ulrik Kofoed Pedersen
// Version :
// Copyright : MIT. See LICENSE file.
// Description : Use blosc with different algorithms to compress data from
// datasets in an HDF5 f... | Include main hdf5 header to successful build | Include main hdf5 header to successful build | C++ | mit | ulrikpedersen/benchpress,ulrikpedersen/benchpress,ulrikpedersen/benchpress |
cfb6e9127f225f01ea505c13ce1e5c952455dea7 | Paddle.cpp | Paddle.cpp | #include "paddle.h"
int Paddle::numOfPaddles = 0;
void Paddle::update()
{
al_get_mouse_state(&mouseState);
mouseY = al_get_mouse_state_axis(&mouseState, 1);
setPosition(x, mouseY);
}
void Paddle::reset()
{
al_get_mouse_state(&mouseState);
mouseY = al_get_mouse_state_axis(&mouseState, 1);
se... | #include "Paddle.h"
int Paddle::numOfPaddles = 0;
void Paddle::update()
{
al_get_mouse_state(&mouseState);
mouseY = al_get_mouse_state_axis(&mouseState, 1);
setPosition(x, mouseY);
}
void Paddle::reset()
{
al_get_mouse_state(&mouseState);
mouseY = al_get_mouse_state_axis(&mouseState, 1);
se... | FIx GCC was unable to compile in Linux | FIx GCC was unable to compile in Linux
GCC is a case sensitive program in Linux and a #include directive was incorrectly typed.
Previous New
paddle.h -> Paddle.h
| C++ | apache-2.0 | rlam1/Allegro_pong,rlam1/Allegro_pong |
d9b5aa088b7a3d6fc4d740e6a59ebc6c739b332b | src/applicationMain.cc | src/applicationMain.cc | #include <stdio.h>
#include "mutex.h"
#include "thread.h"
#include "window.h"
using System::Window;
class DisplayThreadEntry : public System::ThreadEntry {
public:
virtual ~DisplayThreadEntry() {}
virtual void *Run(void *arg) {
Window *mainWindow = Window::Create();
int exitValue = mainWindow->DoMessageLoop()... | #include <stdio.h>
#include "mutex.h"
#include "thread.h"
#include "window.h"
using System::Window;
using System::Thread;
using System::ThreadEntry;
class DisplayThreadEntry : public ThreadEntry {
public:
virtual ~DisplayThreadEntry() {}
virtual void *Run(void *arg) {
Window *mainWindow = Window::Create();
in... | Clean up some namespace things | Clean up some namespace things
| C++ | mit | Frinter/fire-frame,Frinter/fire-frame |
bd46ddda649412fce0460ff5cb733d1f1f349849 | main.cpp | main.cpp | #include <GL/glew.h>
#include <SDL2/SDL.h>
int main(void)
{
int flags = SDL_WINDOW_OPENGL | SDL_RENDERER_PRESENTVSYNC;
SDL_Init(SDL_INIT_EVERYTHING);
auto window = SDL_CreateWindow("title", 0, 0, 320, 240, flags);
auto context = SDL_GL_CreateContext(window);
glewInit();
glClearColor(0, 1, 0, 1);
glClea... | #include <GL/glew.h>
#include <SDL2/SDL.h>
int main(void)
{
int flags = SDL_WINDOW_OPENGL | SDL_RENDERER_PRESENTVSYNC;
SDL_Init(SDL_INIT_EVERYTHING);
auto window = SDL_CreateWindow("title", 0, 0, 320, 240, flags);
auto context = SDL_GL_CreateContext(window);
glewInit();
glClearColor(0, 1, 0, 1);
glClea... | Add code to destroy window upon quit | Add code to destroy window upon quit
| C++ | agpl-3.0 | Veux/warg,jearc/warg,jearc/warg,Veux/warg |
ef186f251c6d6a948d80b8acb87cd0a31e6bb345 | test/test_main.cpp | test/test_main.cpp | #include <iostream>
#include "gtest/gtest.h"
int main(int argc, char* argv[])
{
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
| #include "core/logging.hpp"
#include <iostream>
#include <gtest/gtest.h>
int main(int argc, char* argv[])
{
core::logging_init();
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
| Test Main: Set up logging | Test Main: Set up logging
This will prevent segfaults that would otherwise happen in tests.
| C++ | mit | important-business/engine,important-business/engine |
b8dd50f2cf35ce8041cc96935091f8ba7567faf2 | src/cavalieri.cpp | src/cavalieri.cpp | #include <glog/logging.h>
#include <atom/atom.h>
#include <core.h>
int main(int argc, char **argv)
{
atom_initialize();
{
ATOM_GC;
atom_attach_thread();
start_core(argc, argv);
}
atom_terminate();
return 0;
}
| #include <atom/atom.h>
#include <core.h>
int main(int argc, char **argv)
{
atom_initialize();
{
ATOM_GC;
atom_attach_thread();
start_core(argc, argv);
}
atom_terminate();
return 0;
}
| Remove extra blank line and include | Remove extra blank line and include
| C++ | mit | juruen/cavalieri,juruen/cavalieri,juruen/cavalieri,juruen/cavalieri |
7cecd95ec5bcda27ae12ea3410186cbb830f6a6b | searchcore/src/vespa/searchcore/proton/test/bucketfactory.cpp | searchcore/src/vespa/searchcore/proton/test/bucketfactory.cpp | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "bucketfactory.h"
using document::BucketId;
using document::DocumentId;
using storage::spi::Bucket;
using storage::spi::PartitionId;
namespace proton {
BucketId
BucketFactory::getBucketId(... | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "bucketfactory.h"
#include <vespa/persistence/spi/test.h>
using document::BucketId;
using document::DocumentId;
using storage::spi::Bucket;
using storage::spi::PartitionId;
using storage::sp... | Consolidate creation of storage::spi::Bucket in unit tests. | Consolidate creation of storage::spi::Bucket in unit tests.
| 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 |
e7469f02b115b1c654cf4adfd87eb99fe8dcb4a6 | warnings/warnings.cpp | warnings/warnings.cpp | #include <cstdint>
#include <memory>
#include <iostream>
class Box {
public:
Box(int x) : x_(x) {}
virtual ~Box() = default;
void Print() {
std::cout << x_ << "\n";
}
private:
int x_ {0};
};
std::unique_ptr<Box> Create(int x) {
return std::make_unique<Box>(x);
}
int... | #include <cstdint>
#include <memory>
#include <iostream>
class Box {
public:
Box(int x) : x_(x) {}
virtual ~Box() = default;
void Print() {
std::cout << x_ << "\n";
}
private:
int x_ {0};
};
std::unique_ptr<Box> Create(int x) {
return std::make_unique<Box>(x);
}
voi... | Create a shared_ptr from a unique_ptr | Create a shared_ptr from a unique_ptr
| C++ | mit | zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend |
b737062129bd8ad0b68c63ff066ccc75018a1ca8 | TestUnits/UnitTests.cpp | TestUnits/UnitTests.cpp |
#define CATCH_CONFIG_RUNNER
#include <catch.hpp>
int main(int argc, char * const argv[])
{
int result = Catch::Session().run(argc, argv);
#ifdef WIN32
system("PAUSE");
#endif
return result;
}
|
#define CATCH_CONFIG_RUNNER
#include <catch.hpp>
#include <ionCore.h>
int main(int argc, char * const argv[])
{
int result = Catch::Session().run(argc, argv);
#ifdef WIN32
ion::WaitForUser();
#endif
return result;
}
| Use ionCore alternative to system("PAUSE") | [TestUnits] Use ionCore alternative to system("PAUSE")
| C++ | mit | iondune/ionEngine,iondune/ionEngine |
17f8637d07a90a820d3bb50c8a7f120186d93fbe | main.cpp | main.cpp | #include <SFML/Graphics.hpp>
//#include "libs/GUI-SFML/include/GUI-SFML.hpp"
#include <iostream>
#include "Game.hpp"
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
//gsf::GUIEnvironment environment( window );
Game game(false, true, false);
game.run();
return 0;
}
| #include <SFML/Graphics.hpp>
//#include "libs/GUI-SFML/include/GUI-SFML.hpp"
#include <iostream>
#include "Game.hpp"
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
//gsf::GUIEnvironment environment( window );
bool soundEnabled{ false };
Game game(false, true, soundEnabled);
... | Use var for enabling or disabling sound | Use var for enabling or disabling sound
| C++ | mit | TmCrafz/ArenaSFML,TmCrafz/ArenaSFML |
d9be60efbb657fa3b5c24987da4b175b3cd06d4b | main.cpp | main.cpp | #include <iostream>
#include <opencv2/opencv.hpp>
#include "clicker.hpp"
using namespace cv;
using namespace std;
const char* window_title = "Join-Robockets Clientside Software";
int main() {
//Initialize camera.
VideoCapture cap(CV_CAP_ANY);
if(!cap.isOpened()) {
cerr << "Could not open image c... | #include <iostream>
#include <opencv2/opencv.hpp>
#include "clicker.hpp"
using namespace cv;
using namespace std;
string window_title = "Join-Robockets Clientside Software";
int main() {
//Initialize camera.
VideoCapture cap(CV_CAP_ANY);
if(!cap.isOpened()) {
cerr << "Could not open image captur... | Use C++ string instead of C string | Use C++ string instead of C string
| C++ | mit | Team4761/Join-Robockets-Clientside |
1407c979a3ba8599546468d461f5403f317bddd3 | core/src/fpdfapi/fpdf_render/fpdf_render_pattern_embeddertest.cpp | core/src/fpdfapi/fpdf_render/fpdf_render_pattern_embeddertest.cpp | // Copyright 2015 PDFium 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 "testing/embedder_test.h"
#include "testing/gtest/include/gtest/gtest.h"
class FPDFRenderPatternEmbeddertest : public EmbedderTest {};
TEST_F(FPDFRen... | // Copyright 2015 PDFium 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 "testing/embedder_test.h"
#include "testing/gtest/include/gtest/gtest.h"
class FPDFRenderPatternEmbeddertest : public EmbedderTest {};
TEST_F(FPDFRen... | Fix a memory leak in FPDFPageFuncEmbeddertest. | Fix a memory leak in FPDFPageFuncEmbeddertest.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1514283002 .
| C++ | bsd-3-clause | DrAlexx/pdfium,DrAlexx/pdfium,andoma/pdfium,andoma/pdfium,andoma/pdfium,andoma/pdfium,DrAlexx/pdfium,DrAlexx/pdfium |
a2ced186b7a83cd488d0a3076e572a751bcba8bf | src/main/enums/indexTypes.cc | src/main/enums/indexTypes.cc | /*******************************************************************************
* Copyright 2013-2014 Aerospike, Inc.
*
* 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://ww... | /*******************************************************************************
* Copyright 2013-2014 Aerospike, Inc.
*
* 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://ww... | Fix to match the enum definitions in C and nodejs for indextypes. | Fix to match the enum definitions in C and nodejs for indextypes.
| C++ | apache-2.0 | dohse/aerospike-client-nodejs,tonypujals/aerospike-client-nodejs,dohse/aerospike-client-nodejs,jklepp-tgm/aerospike-client-nodejs,jklepp-tgm/aerospike-client-nodejs,aerospike/aerospike-client-nodejs,tonypujals/aerospike-client-nodejs,tonypujals/aerospike-client-nodejs,tonypujals/aerospike-client-nodejs,jklepp-tgm/aeros... |
5409fc8635bf82c76de140c57567468b3b520bf9 | R2Bot/src/main.cpp | R2Bot/src/main.cpp | #include "Controller.h"
#include "JobHandler.h"
#include "JobQueue.h"
#include "Sensor.h"
#include <list>
std::list<Sensor> sensors;
std::list<Controller> controllers;
std::list<JobHandler> jobHandlers;
JobQueue jobQueue;
/** Initializes a Sensor object for each sensor */
void initializeSensors() {
// "TODO: initial... | #include "Controller.h"
#include "JobHandler.h"
#include "JobQueue.h"
#include "Sensor.h"
#include <vector>
std::vector<Sensor> sensors;
std::vector<Controller> controllers;
std::vector<JobHandler> jobHandlers;
JobQueue jobQueue;
/** Initializes a Sensor object for each sensor */
void initializeSensors() {
// "TODO:... | Use vector instead of list | Use vector instead of list
| C++ | mit | cornell-cup/cs-r2bot2,cornell-cup/cs-r2bot2,kzj1995/cs-r2bot2,kzj1995/cs-r2bot2,kzj1995/cs-r2bot2,cornell-cup/cs-r2bot2,cornell-cup/cs-r2bot2,cornell-cup/cs-r2bot2 |
a7b06e5ad2147752b7e0a82c0c37778c72def66e | PlasMOUL/Messages/SimulationMsg.cpp | PlasMOUL/Messages/SimulationMsg.cpp | /******************************************************************************
* This file is part of dirtsand. *
* *
* dirtsand is free software: you can redistribute it and/or modify *
... | /******************************************************************************
* This file is part of dirtsand. *
* *
* dirtsand is free software: you can redistribute it and/or modify *
... | Fix missing write call in SubWorldMsg | Fix missing write call in SubWorldMsg | C++ | agpl-3.0 | H-uru/dirtsand,H-uru/dirtsand,GehnShard/dirtsand,GehnShard/dirtsand |
cda3a60c37023a27b87e9824c1edd0156a7ddd86 | webkit/senchatouchqtwebkit/main.cpp | webkit/senchatouchqtwebkit/main.cpp | #include <QtGui/QApplication>
#include <QtCore/QProcess>
#include <QtWebKit/QWebView>
#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK)
#include <eikenv.h>
#include <eikappui.h>
#include <aknenv.h>
#include <aknappui.h>
#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK
int main(int argc, char *argv[])
{
QApplication ... | #include <QtGui>
#include <QtWebKit>
#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK)
#include <eikenv.h>
#include <eikappui.h>
#include <aknenv.h>
#include <aknappui.h>
#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
#if defined(Q_OS_SYMBIAN) && de... | Use QGraphicsWebView instead of QWebView | Use QGraphicsWebView instead of QWebView
As suggested by http://trac.webkit.org/wiki/QtWebKitTiling
Works on Qt 4.6 and up.
| C++ | bsd-3-clause | ariya/X2,ariya/X2,ariya/X2 |
d6a87531249125c790c723f865f0e16f0c6f9794 | modules/highgui/perf/perf_input.cpp | modules/highgui/perf/perf_input.cpp | #include "perf_precomp.hpp"
using namespace std;
using namespace cv;
using namespace perf;
using std::tr1::make_tuple;
using std::tr1::get;
typedef std::tr1::tuple<String, bool> VideoCapture_Reading_t;
typedef perf::TestBaseWithParam<VideoCapture_Reading_t> VideoCapture_Reading;
PERF_TEST_P(VideoCapture_Reading, Rea... | #include "perf_precomp.hpp"
using namespace std;
using namespace cv;
using namespace perf;
using std::tr1::make_tuple;
using std::tr1::get;
typedef perf::TestBaseWithParam<String> VideoCapture_Reading;
PERF_TEST_P(VideoCapture_Reading, ReadFile, testing::Values( "highgui/video/big_buck_bunny.avi",
... | Remove second argument from VideoCapture_Reading perf test | Remove second argument from VideoCapture_Reading perf test
| C++ | apache-2.0 | opencv/opencv,opencv/opencv,opencv/opencv,apavlenko/opencv,apavlenko/opencv,opencv/opencv,apavlenko/opencv,opencv/opencv,apavlenko/opencv,opencv/opencv,opencv/opencv,apavlenko/opencv,opencv/opencv,opencv/opencv,apavlenko/opencv,opencv/opencv |
5b0d04ebd05485c50379d59575f84e2b15f40100 | test/correctness/buffer_t.cpp | test/correctness/buffer_t.cpp | #include <stdio.h>
#include "Halide.h"
#define CHECK(f, s32, s64) \
static_assert(offsetof(buffer_t, f) == (sizeof(void*) == 8 ? (s64) : (s32)), #f " is wrong")
int main(int argc, char **argv) {
CHECK(dev, 0, 0);
CHECK(host, 8, 8);
CHECK(extent, 12, 16);
CHECK(stride, 28, 32);
CHECK(min, 44,... | #include <stdio.h>
#include "Halide.h"
#define CHECK(f, s32, s64) \
static_assert(offsetof(buffer_t, f) == (sizeof(void*) == 8 ? (s64) : (s32)), #f " is wrong")
int main(int argc, char **argv) {
CHECK(dev, 0, 0);
CHECK(host, 8, 8);
CHECK(extent, 12, 16);
CHECK(stride, 28, 32);
CHECK(min, 44,... | Allow for struct padding in test | Allow for struct padding in test
Former-commit-id: 5beecba366bb0e643172aeace0c57cde4672956a | C++ | mit | Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide |
d8c76286ea7703ae05109c8f39132c96b9e3bee7 | Common/TargetOptionsCommandFlags.cpp | Common/TargetOptionsCommandFlags.cpp | //===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------... | //===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------... | Rename to match an LLVM change | Rename to match an LLVM change
git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@329841 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/lld,llvm-mirror/lld |
8c54694edaac34acb4d615faf94dff8f895ffddc | test/Profile/cxx-structors.cpp | test/Profile/cxx-structors.cpp | // Tests for instrumentation of C++ constructors and destructors.
//
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.11.0 -x c++ %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s
struct Foo {
Foo() {}
Foo(int) {}
~Foo() {}
};
struct Bar : public Foo {
Bar() {}
Bar(int x) : Foo(x) {}
~Bar();
};... | // Tests for instrumentation of C++ constructors and destructors.
//
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.11.0 -x c++ %s -o %t -emit-llvm -fprofile-instrument=clang
// RUN: FileCheck %s -input-file=%t -check-prefix=INSTR
// RUN: FileCheck %s -input-file=%t -check-prefix=NOINSTR
struct Foo {
Foo() {}
Fo... | Make a test more explicit. NFC. | [profiling] Make a test more explicit. NFC.
The cxx-structors.cpp test checks that some instrumentation doesn't
appear, but it should be more explicit about which instrumentation it
actually expects to appear.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@295532 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-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,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... |
2fecb37f02cd77baf0cba61a4e79d127c47b9c7c | deal.II/deal.II/source/fe/fe_q_2d.cc | deal.II/deal.II/source/fe/fe_q_2d.cc | //----------------------------------------------------------------
// $Id$
// Version: $Name$
//
// Copyright (C) 2001, 2002, 2003 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
// to the file deal.II/doc/... | //----------------------------------------------------------------
// $Id$
// Version: $Name$
//
// Copyright (C) 2001, 2002, 2003, 2004 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
// to the file deal.I... | Work around a trivial problem with the hp compiler. | Work around a trivial problem with the hp compiler.
git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@9540 0785d39b-7218-0410-832d-ea1e28bc413d
| C++ | lgpl-2.1 | johntfoster/dealii,ESeNonFossiIo/dealii,adamkosik/dealii,jperryhouts/dealii,spco/dealii,nicolacavallini/dealii,YongYang86/dealii,Arezou-gh/dealii,natashasharma/dealii,ESeNonFossiIo/dealii,jperryhouts/dealii,msteigemann/dealii,flow123d/dealii,adamkosik/dealii,shakirbsm/dealii,ibkim11/dealii,JaeryunYim/dealii,natashashar... |
3dbe80feb1f47bca3477228f45bcb10a90d97efc | examples/rtt/TimerApp3/TimerApp3.cpp | examples/rtt/TimerApp3/TimerApp3.cpp | /*
* Timer compilation example.
* TODO
*/
#include <fastarduino/FastIO.hh>
#include <fastarduino/Timer.hh>
constexpr const Board::Timer TIMER = Board::Timer::TIMER1;
// Define vectors we need in the example
USE_TIMERS(1);
using TIMER_TYPE = Timer<TIMER>;
constexpr const uint32_t PERIOD_US = 1000000;
constexpr co... | /*
* Timer compilation example.
* Shows how to use a CTC Timer (not RTT) to blink a LED.
*
* Wiring:
* - on ATmega328P based boards (including Arduino UNO):
* - D13 (PB5) LED connected to ground through a resistor
* - on Arduino MEGA:
* - D13 (PB7) LED connected to ground through a resistor
* - on ATtinyX... | Rework and fix Timer ISR size optimization. | Rework and fix Timer ISR size optimization.
| C++ | lgpl-2.1 | jfpoilpret/fast-arduino-lib,jfpoilpret/fast-arduino-lib,jfpoilpret/fast-arduino-lib,jfpoilpret/fast-arduino-lib |
6b674b8a2f3937744e5b3e5e4fc5482cac3c45c7 | chrome/browser/ui/webui/print_preview_ui.cc | chrome/browser/ui/webui/print_preview_ui.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 "chrome/browser/ui/webui/print_preview_ui.h"
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/... | // 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 "chrome/browser/ui/webui/print_preview_ui.h"
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/... | Print Preview: Fix typo from r78639. | Print Preview: Fix typo from r78639.
BUG=76707
TEST=page count initialized correctly in print preview.
R=arv@chromium.org
Review URL: http://codereview.chromium.org/6688041
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@78747 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | Crystalnix/house-of-life-chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,ropik/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,adobe/chromium,adobe/chromium,gavin... |
c513257f5f72594657e5bce4aa9ad41b4ee21bcb | Wangscape/TilePartitionerBase.cpp | Wangscape/TilePartitionerBase.cpp | #include "TilePartitionerBase.h"
void TilePartitionerBase::applyWeights(const std::vector<float>& weights, std::vector<sf::Uint8>& alphas)
{
int err = 255;
float total_weight = 0.f;
for (auto weight : weights)
total_weight += weight;
if (total_weight == 0.f)
{
// This shouldn't happ... | #include "TilePartitionerBase.h"
void TilePartitionerBase::applyWeights(const std::vector<float>& weights, std::vector<sf::Uint8>& alphas)
{
int err = 255;
float total_weight = 0.f;
for (auto weight : weights)
total_weight += weight;
for (auto& alpha : alphas)
{
alpha = 0;
}
... | Replace the alpha calculator with winner-takes-all | Replace the alpha calculator with winner-takes-all
Both will have to become instances of a base class or function type in
future.
| C++ | mit | Wangscape/Wangscape,serin-delaunay/Wangscape,serin-delaunay/Wangscape,Wangscape/Wangscape,Wangscape/Wangscape |
953be8fe4d763569c49edf12f6960c6cb009350a | Capu/src/util/ConsoleLogAppender.cpp | Capu/src/util/ConsoleLogAppender.cpp | #include "capu/util/ConsoleLogAppender.h"
#include "capu/util/LogMessage.h"
#include "capu/os/Console.h"
#include "capu/os/Time.h"
#include <stdio.h>
namespace capu
{
Mutex ConsoleLogAppender::m_logMutex;
ConsoleLogAppender::~ConsoleLogAppender()
{
}
void ConsoleLogAppender::logMessage(const LogM... | #include "capu/util/ConsoleLogAppender.h"
#include "capu/util/LogMessage.h"
#include "capu/util/ScopedLock.h"
#include "capu/os/Console.h"
#include "capu/os/Time.h"
#include <stdio.h>
namespace capu
{
Mutex ConsoleLogAppender::m_logMutex;
ConsoleLogAppender::~ConsoleLogAppender()
{
}
void Console... | Replace manual locking by ScopedLock | Replace manual locking by ScopedLock
Change-Id: Ice9efbc1d0445b9251ae411c344290e85e73ceac
| C++ | apache-2.0 | bmwcarit/capu,bmwcarit/capu |
5a97e05945d4fd9a78cad319fc6972feac9a8f7b | primality-test.cpp | primality-test.cpp | #include<cmath>
#include<iostream>
using namespace std;
bool isPrimeBruteForce(int x)
{
if (x < 2)
return false;
float sqroot_x = sqrt(x);
for(int i=0; i <= sqroot_x; i++) { /* If there were only factors above the square root of x, they would be bigger than x itself. */
if (x%i==0)
return false;
}
return ... | #include<cmath>
#include<iostream>
using namespace std;
bool isPrimeBruteForce(double x)
{
if (x < 2)
return false;
double sqroot_x = sqrt(x);
for(int i=0; i <= sqroot_x; i++) { /* If there were only factors above the square root of x, they would be bigger than x itself. */
if (x%i==0)
return false;
}
ret... | Correct wrong type of variables 'number' and 'x' (int->double) | Correct wrong type of variables 'number' and 'x' (int->double)
| C++ | mit | luforst/primality-test,luforst/primality-test |
7ba376be6361bafbb1d26cfa03f976d0161cc639 | test/CodeGenCXX/throw-expressions.cpp | test/CodeGenCXX/throw-expressions.cpp | // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -Wno-unreachable-code -Werror -emit-llvm -o - %s | FileCheck %s
// expected-no-diagnostics
int val = 42;
int& test1() {
return throw val, val;
}
int test2() {
return val ? throw val : val;
}
// rdar://problem/8608801
void test3() {
throw false;
}
// PR10582
int... | // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -Wno-unreachable-code -Werror -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s
int val = 42;
int& test1() {
return throw val, val;
}
int test2() {
return val ? throw val : val;
}
// rdar://problem/8608801
void test3() {
throw false;
}
// PR10582
int t... | Add missing triple to unit test. | Add missing triple to unit test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@181465 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl... |
562fbdbb5f5cb120b1e747c188d4fcdbbba815a6 | ionGraphicsGL/CIndexBuffer.cpp | ionGraphicsGL/CIndexBuffer.cpp |
#include "CIndexBuffer.h"
#include <glad/glad.h>
namespace ion
{
namespace Graphics
{
namespace GL
{
void CIndexBuffer::UploadData(void const * Data, size_t const Elements, EValueType const ValueType)
{
CheckedGLCall(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, Handle));
CheckedGLCall(... |
#include "CIndexBuffer.h"
#include <glad/glad.h>
namespace ion
{
namespace Graphics
{
namespace GL
{
void CIndexBuffer::UploadData(void const * Data, size_t const Elements, EValueType const ValueType)
{
CheckedGLCall(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, Handle));
CheckedGLCall(... | Fix bug where uninitialized index buffers still wouldn't work after initialization | Fix bug where uninitialized index buffers still wouldn't work after initialization
| C++ | mit | iondune/ionEngine,iondune/ionEngine |
3105998c9bb9e7d972fb2dbc4f9a34d126e5236d | src/MainWindow.cpp | src/MainWindow.cpp | #include "MainWindow.h"
#include "ui_MainWindow.h"
#include "CuteNode.h"
#include "NodeScene.h"
MainWindow::MainWindow(QWidget* parent)
: QMainWindow(parent)
, _scene{std::make_unique<NodeScene>(QRectF(0.0, 0.0, 3000.0, 3000.0))}
, _ui{std::make_unique<Ui::MainWindow>()}
{
_ui->setupUi(this);
fo... | #include "MainWindow.h"
#include "ui_MainWindow.h"
#include "CuteNode.h"
#include "NodeScene.h"
MainWindow::MainWindow(QWidget* parent)
: QMainWindow(parent)
, _scene{std::make_unique<NodeScene>(QRectF(0.0, 0.0, 3000.0, 3000.0))}
, _ui{std::make_unique<Ui::MainWindow>()}
{
_ui->setupUi(this);
fo... | Put nodes into middle of scene to improve zooming | Put nodes into middle of scene to improve zooming
| C++ | mit | ifschleife/CuteNodes |
6374d6547b28b25ee9f94839f6270589899dd34a | src/cmd/manual.cpp | src/cmd/manual.cpp | #include "command.h"
#include "../CommandHandler.h"
#include "../option.h"
/* full name of the command */
_CMDNAME("manual");
/* description of the command */
_CMDDESCR("view the lynxbot manual");
/* command usage synopsis */
_CMDUSAGE("$manual");
/* manual: view the lynxbot manual */
std::string CommandHandler::manu... | #include "command.h"
#include "../CommandHandler.h"
#include "../option.h"
/* full name of the command */
_CMDNAME("manual");
/* description of the command */
_CMDDESCR("view the lynxbot manual");
/* command usage synopsis */
_CMDUSAGE("$manual");
/* manual: view the lynxbot manual */
std::string CommandHandler::manu... | Use new website macro instead | Use new website macro instead
| C++ | mit | frolv/osrs-twitch-bot,frolv/lynxbot,frolv/lynxbot,frolv/osrs-twitch-bot |
b3aa7fb7bbe77ccd109e07097bb099c4be9d3b3f | lib/src/tags/tag-database-factory.cpp | lib/src/tags/tag-database-factory.cpp | #include "tag-database-factory.h"
#include "tag-database-in-memory.h"
#include "tag-database-sqlite.h"
#include <QFile>
TagDatabase *TagDatabaseFactory::Create(QString directory)
{
if (!directory.endsWith("/") && !directory.endsWith("\\"))
directory += "/";
QString typesFile = directory + "tag-types.txt";
if (... | #include "tag-database-factory.h"
#include "tag-database-in-memory.h"
#include "tag-database-sqlite.h"
#include <QFile>
TagDatabase *TagDatabaseFactory::Create(QString directory)
{
if (!directory.endsWith("/") && !directory.endsWith("\\"))
directory += "/";
QString typesFile = directory + "tag-types.txt";
if (... | Use InMemory TagDatabase by default if none exists | Use InMemory TagDatabase by default if none exists
| C++ | apache-2.0 | Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber |
872fdb81dec8ba562139b4af58c7ccad9e62bbf2 | src/compiler/util.cpp | src/compiler/util.cpp | //
// Copyright (c) 2010 The ANGLE Project 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 <math.h>
#include <stdlib.h>
#include "util.h"
#ifdef _MSC_VER
#include <locale.h>
#else
#include <sstream>
#endif
doub... | //
// Copyright (c) 2010 The ANGLE Project 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 <math.h>
#include <stdlib.h>
#include "util.h"
#ifdef _MSC_VER
#include <locale.h>
#else
#include <sstream>
#endif
doub... | Fix memory leak in float literal parsing Issue=93 | Fix memory leak in float literal parsing
Issue=93
Contributed by Benoit Jacob
git-svn-id: 947ae547afacb859f3991e003b9d6feb04be57d7@504 736b8ea6-26fd-11df-bfd4-992fa37f6226
| C++ | bsd-3-clause | geekboxzone/lollipop_external_chromium_org_third_party_angle,adobe/angle.js,jgcaaprom/android_external_chromium_org_third_party_angle,android-ia/platform_external_chromium_org_third_party_angle,Mustaavalkosta/android_external_angle,xin3liang/platform_external_chromium_org_third_party_angle,MIPS/external-chromium_org-th... |
836d7db79c556f09e5e792884c777dcde343b653 | chrome/browser/sync/glue/chrome_encryptor.cc | chrome/browser/sync/glue/chrome_encryptor.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 "chrome/browser/sync/glue/chrome_encryptor.h"
#include "chrome/browser/password_manager/encryptor.h"
namespace browser_sync {
ChromeEncryp... | // 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 "chrome/browser/sync/glue/chrome_encryptor.h"
#include "chrome/browser/password_manager/encryptor.h"
namespace browser_sync {
ChromeEncryp... | Fix EncryptString call that should be a DecryptString call | [Sync] Fix EncryptString call that should be a DecryptString call
Unit tests to catch this will come in another CL.
BUG=116607
TEST=
Review URL: https://chromiumcodereview.appspot.com/9585025
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@124772 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | dednal/chromium.src,M4sse/chromium.src,rogerwang/chromium,anirudhSK/chromium,hujiajie/pa-chromium,dednal/chromium.src,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,robclark/chromium,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,dedna... |
8ce842d38d0b32149e874d6855c91e8c68ba65a7 | modules/canvaskit/viewer_bindings.cpp | modules/canvaskit/viewer_bindings.cpp | /*
* Copyright 2020 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <emscripten.h>
#include <emscripten/bind.h>
#include "tools/viewer/SampleSlide.h"
#include <string>
using namespace emscripten;
EMSCRIPTEN_BINDINGS(Viewer) {
fun... | /*
* Copyright 2020 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <emscripten.h>
#include <emscripten/bind.h>
#include "include/core/SkCanvas.h"
#include "tools/viewer/SampleSlide.h"
#include <string>
using namespace emscripten;
EM... | Fix the CanvasKit viewer build | Fix the CanvasKit viewer build
Change-Id: I82e28478bd9c52f5633e74472ab2b256961cdf45
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281050
Reviewed-by: Kevin Lubick <7cdab2cfab351f23814786ba39716e90eed69047@google.com>
| C++ | bsd-3-clause | google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/pla... |
f79b34db89c5528c0313661b234eead23bd5911b | test_all/src/main.cpp | test_all/src/main.cpp | #include "ofMain.h"
#include "ofApp.h"
#include "ofAppGLFWWindow.h"
int main() {
ofGLFWWindowSettings settings;
settings.width = 1280;
settings.height = 720;
settings.setPosition(ofVec2f(300,0));
settings.resizable = true;
shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);
... | #include "ofMain.h"
#include "ofApp.h"
#include "ofAppGLFWWindow.h"
int main() {
ofGLFWWindowSettings settings;
settings.width = 1280;
settings.height = 720;
settings.setPosition(ofVec2f(300,0));
settings.resizable = true;
shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);
... | Make gui window a bit more responsive | Make gui window a bit more responsive
| C++ | mit | HellicarAndLewis/LectureVisualisation |
0fc214856f4c2ed5b17473b125df671dd99c11be | tests/star_product_associativity.cpp | tests/star_product_associativity.cpp | #include "../kontsevich_graph_series.hpp"
#include <ginac/ginac.h>
#include <iostream>
using namespace std;
using namespace GiNaC;
size_t order = 2;
int main()
{
// Compute relevant primes
map< size_t, set<KontsevichGraph> > primes;
for (size_t n = 0; n <= order; ++n)
{
primes[n] = KontsevichG... | #include "../kontsevich_graph_series.hpp"
#include <ginac/ginac.h>
#include <iostream>
using namespace std;
using namespace GiNaC;
size_t order = 2;
int main()
{
// Compute relevant primes
map< size_t, set<KontsevichGraph> > primes;
for (size_t n = 0; n <= order; ++n)
{
primes[n] = KontsevichG... | Append a size_t to a string in the correct way, using std::to_string. | Append a size_t to a string in the correct way, using std::to_string.
| C++ | mit | rburing/kontsevich_graph_series-cpp |
da5163a51238eb06902c961b562a6067434026e7 | examples/apps/settings/main.cpp | examples/apps/settings/main.cpp | /* * This file is part of meego-im-framework *
*
* Copyright (C) 2012 Mattia Barbon <mattia@develer.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1 as published by the Free Software Foundation
* and appearin... | /* This file is part of Maliit framework
*
* Copyright (C) 2012 Mattia Barbon <mattia@develer.com>
*
* Contact: maliit-discuss@lists.maliit.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Softwa... | Fix license in settings example. | Fix license in settings example.
RevBy: Jon Nordby
| C++ | lgpl-2.1 | jpetersen/framework,jpetersen/framework,RHawkeyed/framework,binlaten/framework,Elleo/framework,RHawkeyed/framework,Elleo/framework |
4f4df232e66101b2856e5f5ec0ee81ead96ba69d | demos/FPL_Cpp/main.cpp | demos/FPL_Cpp/main.cpp | #define FPL_AUTO_NAMESPACE
#include <final_platform_layer.hpp>
int main(int argc, char **args) {
Settings settings = DefaultSettings();
CopyAnsiString("Software Rendering Example", settings.window.windowTitle, FPL_ARRAYCOUNT(settings.window.windowTitle) - 1);
settings.video.driverType = VideoDriverType::Software;
... | #define FPL_AUTO_NAMESPACE
#include <final_platform_layer.hpp>
struct RandomSeries {
uint16_t index;
};
static uint16_t RandomU16(RandomSeries &series) {
series.index ^= (series.index << 13);
series.index ^= (series.index >> 9);
series.index ^= (series.index << 7);
return (series.index);
}
static uint8_t Ran... | Use random for software rendering demo | Use random for software rendering demo
| C++ | mit | f1nalspace/final_game_tech,f1nalspace/final_game_tech,f1nalspace/final_game_tech |
ce04659be83adf4df8b8859060d3dc888b697fc7 | src/ports/SkFontHost_sandbox_none.cpp | src/ports/SkFontHost_sandbox_none.cpp | /*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkFontHost.h"
#include "SkTypeface.h"
#include "SkTypeface_win.h"
//static
void SkFontHost::EnsureTypefaceAccessible(const SkTypeface& typeface) {
//No sandbox,... | /*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkFontHost.h"
#include "SkTypeface.h"
//static
void SkFontHost::EnsureTypefaceAccessible(const SkTypeface& typeface) {
//No sandbox, nothing to do.
}
| Remove unneeded include which is breaking build. | Remove unneeded include which is breaking build.
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@2694 2bbb7eff-a529-9590-31e7-b0007b416f81
| C++ | bsd-3-clause | Omegaphora/external_skia,MarshedOut/android_external_skia,jtg-gg/skia,spezi77/android_external_skia,geekboxzone/lollipop_external_skia,mozilla-b2g/external_skia,GladeRom/android_external_skia,scroggo/skia,MinimalOS/external_skia,FusionSP/android_external_skia,InfinitiveOS/external_skia,android-ia/platform_external_skia... |
169be4228e077edac91ab61000e424b5e1d45a9b | demos/glyph_paint/side_pane.cpp | demos/glyph_paint/side_pane.cpp | #include "side_pane.hpp"
#include <cppurses/painter/color.hpp>
#include <cppurses/painter/glyph.hpp>
#include <cppurses/widget/widgets/text_display.hpp>
using namespace cppurses;
namespace demos {
namespace glyph_paint {
Side_pane::Side_pane() {
this->width_policy.fixed(16);
space1.wallpaper = L'─';
sp... | #include "side_pane.hpp"
#include <cppurses/painter/color.hpp>
#include <cppurses/painter/glyph.hpp>
#include <cppurses/widget/widgets/text_display.hpp>
using namespace cppurses;
namespace demos {
namespace glyph_paint {
Side_pane::Side_pane() {
this->width_policy.fixed(16);
space1.wallpaper = L'─';
sp... | Remove duplicate brush color set in glyph paint cycle box. | Remove duplicate brush color set in glyph paint cycle box.
| C++ | mit | a-n-t-h-o-n-y/CPPurses |
9db25aeb7f149537fa4f279e49e72706b82378fe | src/ports/SkFontHost_sandbox_none.cpp | src/ports/SkFontHost_sandbox_none.cpp | /*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkFontHost.h"
#include "SkTypeface.h"
#include "SkTypeface_win.h"
//static
void SkFontHost::EnsureTypefaceAccessible(const SkTypeface& typeface) {
//No sandbox,... | /*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkFontHost.h"
#include "SkTypeface.h"
//static
void SkFontHost::EnsureTypefaceAccessible(const SkTypeface& typeface) {
//No sandbox, nothing to do.
}
| Remove unneeded include which is breaking build. | Remove unneeded include which is breaking build.
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@2694 2bbb7eff-a529-9590-31e7-b0007b416f81
| C++ | bsd-3-clause | Hankuo/color-emoji.skia,Hankuo/color-emoji.skia,Frankie-666/color-emoji.skia,MatChung/color-emoji.skia,Hankuo/color-emoji.skia,Hankuo/color-emoji.skia,hbwhlklive/color-emoji.skia,hbwhlklive/color-emoji.skia,MatChung/color-emoji.skia,hbwhlklive/color-emoji.skia,hbwhlklive/color-emoji.skia,Hankuo/color-emoji.skia,Frankie... |
855b39727963c34a6df221f674e0eeaa9c6ca9af | quic/test_tools/failing_proof_source.cc | quic/test_tools/failing_proof_source.cc | // Copyright (c) 2017 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 "quic/test_tools/failing_proof_source.h"
#include "absl/strings/string_view.h"
namespace quic {
namespace test {
void FailingProofSource::... | // Copyright (c) 2017 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 "quic/test_tools/failing_proof_source.h"
#include "absl/strings/string_view.h"
namespace quic {
namespace test {
void FailingProofSource::... | Fix an ASAN failure in //third_party/quic/core:tls_server_handshaker_test by always setting *cert_matched_sni in GetCertChain(). | Fix an ASAN failure in //third_party/quic/core:tls_server_handshaker_test by always setting *cert_matched_sni in GetCertChain().
PiperOrigin-RevId: 395802856
| C++ | bsd-3-clause | google/quiche,google/quiche,google/quiche,google/quiche |
b538c9668f08e21cdd41b39bdad80b640621d199 | test/unit/math/mix/fun/reverse_test.cpp | test/unit/math/mix/fun/reverse_test.cpp | #include <test/unit/math/test_ad.hpp>
TEST(MathMixMatFun, reverse) {
auto f = [](const auto& x) { return stan::math::reverse(x); };
// 0 x 0
Eigen::VectorXd x0(0);
stan::test::expect_ad(f, x0);
// 1 x 1
Eigen::VectorXd x1(1);
x1 << 1;
stan::test::expect_ad(f, x1);
// 4 x 4
Eigen::VectorXd x(4);
... | #include <test/unit/math/test_ad.hpp>
#include <vector>
TEST(MathMixMatFun, reverse_vector) {
auto f = [](const auto& x) { return stan::math::reverse(x); };
// 0 x 0
Eigen::VectorXd x0(0);
stan::test::expect_ad(f, x0);
// 1 x 1
Eigen::VectorXd x1(1);
x1 << 1;
stan::test::expect_ad(f, x1);
// 4 x 4... | Add tests for row vector and array | Add tests for row vector and array
| C++ | bsd-3-clause | stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math |
c0a5540b2f83139a18d18956eb7a59f5d78692ee | DNAnalyzer/DNAnalyzerServerTest/DictionnaireTest.cpp | DNAnalyzer/DNAnalyzerServerTest/DictionnaireTest.cpp | #include "stdafx.h"
#include "CppUnitTest.h"
#include "../DNAnalyzerServer/Dictionnaire.h"
#include "../DNAnalyzerServer/Mots.h"
#include <exception>
#include <unordered_set>
#include <cstring>
#include <string>
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace DNAnalyzerServerTest
{
TEST_CLAS... | #include "stdafx.h"
#include "CppUnitTest.h"
#include "../DNAnalyzerServer/Dictionnaire.h"
#include <exception>
#include <cstring>
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace DNAnalyzerServerTest
{
TEST_CLASS(DictionnaireTest)
{
public:
//ObtenirInstance
TEST_METHOD(ObtenirInstance... | Revert "Ajout de methode de test (incomplete) de Dictionnaire" | Revert "Ajout de methode de test (incomplete) de Dictionnaire"
This reverts commit 4a9fd803dd205891d3ed0866c4c64300c5ac27c7.
| C++ | mit | benjaminchazelle/DNAnalyzer,benjaminchazelle/DNAnalyzer,benjaminchazelle/DNAnalyzer |
29d4a8b0a4b2e21517c1a41379224c647087dd0e | Libs/Widgets/Testing/Cpp/ctkDateRangeWidgetTest1.cpp | Libs/Widgets/Testing/Cpp/ctkDateRangeWidgetTest1.cpp | /*=========================================================================
Library: CTK
Copyright (c) 2010 Kitware Inc.
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:/... | /*=========================================================================
Library: CTK
Copyright (c) 2010 Kitware Inc.
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:/... | Add extra date range widget tests | Add extra date range widget tests
| C++ | apache-2.0 | SINTEFMedtek/CTK,sankhesh/CTK,lassoan/CTK,espakm/CTK,ddao/CTK,Heather/CTK,CJGoch/CTK,msmolens/CTK,CJGoch/CTK,Sardge/CTK,mehrtash/CTK,151706061/CTK,151706061/CTK,Heather/CTK,jcfr/CTK,Heather/CTK,laurennlam/CTK,danielknorr/CTK,espakm/CTK,vovythevov/CTK,Sardge/CTK,SINTEFMedtek/CTK,sankhesh/CTK,CJGoch/CTK,AndreasFetzer/CTK... |
786b6968a0406920beec2f67667b8c1d2dc826c5 | samples/lua/lua.cpp | samples/lua/lua.cpp | #include <iostream>
#include "Crown.h"
#include "lua.hpp"
#include <unistd.h>
using namespace crown;
static void report_errors(lua_State* state, const int status)
{
if (status != 0)
{
std::cerr << "-- " << lua_tostring(state, -1) << std::endl;
lua_pop(state, 1);
}
}
int main(int argc, char** argv)
{
... | #include <iostream>
#include "Crown.h"
#include "lua.hpp"
#include <unistd.h>
using namespace crown;
static void report_errors(lua_State* state, const int status)
{
if (status != 0)
{
std::cerr << "-- " << lua_tostring(state, -1) << std::endl;
lua_pop(state, 1);
}
}
int main(int argc, char** argv)
{
... | Fix building of the engine | Fix building of the engine
| C++ | mit | mikymod/crown,galek/crown,dbartolini/crown,dbartolini/crown,mikymod/crown,taylor001/crown,dbartolini/crown,taylor001/crown,galek/crown,taylor001/crown,taylor001/crown,dbartolini/crown,galek/crown,mikymod/crown,mikymod/crown,galek/crown |
f723b47f0e151475f85c28e85187cd8c5565968e | Magick++/fuzz/utils.cc | Magick++/fuzz/utils.cc | #include <Magick++/Functions.h>
#include <Magick++/ResourceLimits.h>
#include <Magick++/SecurityPolicy.h>
#ifndef FUZZ_MAX_SIZE
#define FUZZ_MAX_SIZE 2048
#endif
class FuzzingInitializer {
public:
FuzzingInitializer() {
Magick::InitializeMagick((const char *) NULL);
Magick::SecurityPolicy::maxMemoryRequest(... | #include <Magick++/Functions.h>
#include <Magick++/ResourceLimits.h>
#include <Magick++/SecurityPolicy.h>
#ifndef FUZZ_MAX_SIZE
#define FUZZ_MAX_SIZE 2048
#endif
class FuzzingInitializer {
public:
FuzzingInitializer() {
// Disable SIMD in jpeg turbo.
(void) putenv(const_cast<char *>("JSIMD_FORCENONE=1"));
... | Disable SIMD in jpeg turbo as suggested to check if that fixes the uninitialised memory issue. | Disable SIMD in jpeg turbo as suggested to check if that fixes the uninitialised memory issue.
| C++ | apache-2.0 | Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick |
c4699cf5087f85fbfb6f6345f8fae288122fcacf | gui/main_window.cpp | gui/main_window.cpp | #include "main_window.hpp"
#include <QVBoxLayout>
#include <QMessageBox>
#include "executable_viewer.hpp"
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
setWindowTitle(QString("Interactive Executable Mangler"));
mdiArea = new QMdiArea();
QVBoxLayout *layout = new QVBoxLayout();
layou... | #include "main_window.hpp"
#include <QMessageBox>
#include "executable_viewer.hpp"
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
setWindowTitle(QString("Interactive Executable Mangler"));
mdiArea = new QMdiArea();
QMenu *file = menuBar()->addMenu(QString("File"));
setCentralWidget(m... | Use mdiArea directly as the window's central widget | Use mdiArea directly as the window's central widget
| C++ | mit | stefanmirea/mangler,SilentControl/mangler |
1972e806413a3d13ddd0cd6c1ad54316677d3d4f | lib/imul.tas.cpp | lib/imul.tas.cpp | #include "common.th"
// c <- multiplicand
// d <- multiplier
// b -> product
.global imul
imul:
pushall(h,i)
i <- d == 0
jnzrel(i, L_done)
L_top:
h <- d & 1
i <- h <> 0
i <- c & i
b <- b + i
c <- c << 1
d <- d >> 1
i <- d <> 0
jnzrel(i, L_top)
L_done:
popall(h,i)
... | #include "common.th"
// c <- multiplicand
// d <- multiplier
// b -> product
.global imul
imul:
pushall(h,i,j,k)
i <- d == 0
jnzrel(i, L_done)
h <- 1
b <- 0
j <- c >> 31 // save sign bit in j
j <- -j // convert sign to flag
c <- c ^ j // adjust multiplicand
c <- c ... | Support signed numbers in imul | Support signed numbers in imul
| C++ | mit | kulp/tenyr,kulp/tenyr,kulp/tenyr |
efb23124e490a8ea76e31812fe467cef3a66556e | test/CerealTest.cpp | test/CerealTest.cpp | #include "UnitTest++/UnitTest++.h"
#include <fstream>
#include <cereal/archives/binary.hpp>
SUITE( CerealTest )
{
TEST( basicSaveAndLoad )
{
const std::string saveFileName = "CerealTest";
const int expectedData = 42;
int actualData = 666;
{
std::ofstream file( save... | #include "UnitTest++/UnitTest++.h"
#include <fstream>
#include <cereal/archives/binary.hpp>
class Base
{
public:
Base() : someConstant(1)
{
}
private:
const int someConstant;
friend cereal::access;
template < class Archive >
void serialize( Archive & a... | Test cereal for loading a constant variable (using a const_cast) | Test cereal for loading a constant variable (using a const_cast)
| C++ | unlicense | WebF0x/StrongAI,WebF0x/StrongAI,WebF0x/StrongAI |
4ca2b035969f12324745670f558d67437379f1be | link-grammar/sat-solver/variables.cpp | link-grammar/sat-solver/variables.cpp | #include "variables.hpp"
#ifdef _VARS
std::ostream& var_defs_stream = cerr;
#endif
| #include "variables.hpp"
#ifdef _VARS
std::ostream& var_defs_stream = cout;
#endif
| Print variable debug output to stdout | sat-solver: Print variable debug output to stdout
Printing them to stderr makes it hard to see them in the context of
regular program output when piping usually to "grep" or "less").
| C++ | lgpl-2.1 | linas/link-grammar,ampli/link-grammar,linas/link-grammar,opencog/link-grammar,linas/link-grammar,linas/link-grammar,linas/link-grammar,ampli/link-grammar,ampli/link-grammar,ampli/link-grammar,ampli/link-grammar,ampli/link-grammar,opencog/link-grammar,opencog/link-grammar,linas/link-grammar,linas/link-grammar,ampli/link... |
bcae5a7f57b76404fcc508dbe8d6e49a28a2f5a3 | ktexteditor/editinterfaceext.cpp | ktexteditor/editinterfaceext.cpp | #include "editinterfaceext.h"
#include "document.h"
using namespace KTextEditor;
uint EditInterfaceExt::globalEditInterfaceExtNumber = 0;
EditInterfaceExt::EditInterfaceExt()
: d(0L)
{
globalEditInterfaceExtNumber++;
myEditInterfaceExtNumber = globalEditInterfaceExtNumber;
}
EditInterfaceExt::~EditInterfaceExt... | /* This file is part of the KDE libraries
Copyright (C) 2003 Hamish Rodda <rodda@kde.org>
Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by t... | Add licence (yes, this means that editinterface.cpp has no licence) | Add licence (yes, this means that editinterface.cpp has no licence)
svn path=/trunk/kdelibs/interfaces/ktexteditor/; revision=266753
| C++ | lgpl-2.1 | DickJ/kate,jfmcarreira/kate,sandsmark/kate,jfmcarreira/kate,hlamer/kate,hlamer/kate,sandsmark/kate,DickJ/kate,hlamer/kate,cmacq2/kate,hlamer/kate,sandsmark/kate,DickJ/kate,hlamer/kate,sandsmark/kate,jfmcarreira/kate,hlamer/kate,hlamer/kate,hlamer/kate,hlamer/kate,cmacq2/kate,cmacq2/kate,hlamer/kate,DickJ/kate |
0965b45dd114f5529974312672c139d4bcd024ba | src/configure/generators/NMakefile.cpp | src/configure/generators/NMakefile.cpp | #include "NMakefile.hpp"
#include <configure/Build.hpp>
#include <configure/Filesystem.hpp>
#include <configure/quote.hpp>
namespace configure { namespace generators {
std::string NMakefile::name() const
{ return "NMakefile"; }
bool NMakefile::is_available(Build& build) const
{
return build.fs().which("nmake"... | #include "NMakefile.hpp"
#include <configure/Build.hpp>
#include <configure/Filesystem.hpp>
#include <configure/quote.hpp>
namespace configure { namespace generators {
std::string NMakefile::name() const
{ return "NMakefile"; }
bool NMakefile::is_available(Build& build) const
{
return build.fs().which("nmake"... | Add -nologo in nmake command lines. | Add -nologo in nmake command lines.
| C++ | bsd-3-clause | hotgloupi/configure,hotgloupi/configure,hotgloupi/configure,hotgloupi/configure,hotgloupi/configure |
cbb0fd9cff4a5b73f3b2498e4ca21831892c723e | server/analyzer.cpp | server/analyzer.cpp | #include "analyzer.h"
#include "dal.h"
#include "glog.h"
#include <iostream>
namespace holmes {
kj::Promise<bool> Analyzer::run(DAL *dal) {
std::vector<Holmes::Fact::Reader> searchedFacts;
auto ctxs = dal->getFacts(premises);
kj::Array<kj::Promise<bool>> analResults =
KJ_MAP(ctx, ctxs) {
if (cache.m... | #include "analyzer.h"
#include "dal.h"
#include "glog.h"
#include <iostream>
namespace holmes {
kj::Promise<bool> Analyzer::run(DAL *dal) {
std::vector<Holmes::Fact::Reader> searchedFacts;
DLOG(INFO) << "Starting analysis " << name;
DLOG(INFO) << "Getting facts for " << name;
auto ctxs = dal->getFacts(premi... | Add logging to analysis for profiling | Add logging to analysis for profiling
| C++ | mit | maurer/holmes,maurer/holmes,tempbottle/holmes,chubbymaggie/holmes,BinaryAnalysisPlatform/holmes |
50a59ffa738b7c68c6d669973779612bf8cdf321 | example/PIDexample.cpp | example/PIDexample.cpp | #include <PIDController.h>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
PIDController* pid = new PIDController(1,0,0,-100,100);
pid->on();
pid->targetSetpoint(100);
pid->off();
cout << "Hello World!" << endl;
return 0;
}
| #include <PIDController.h>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
PIDController* pid = new PIDController(5,0.5,0.25,-100,100);
pid->on(); // Turn PID controller on
pid->targetSetpoint(10); // Change desired setpoint to 10
double t = 0; // Init... | Update example to be actually somewhat useful | Update example to be actually somewhat useful
| C++ | mit | silentreverb/pid-controller |
c75d6bd0fad60e1ab6421b481d5eb575f4a5ce3e | src/gtest/main.cpp | src/gtest/main.cpp | #include "gtest/gtest.h"
int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
| #include "gtest/gtest.h"
#include "sodium.h"
int main(int argc, char **argv) {
assert(sodium_init() != -1);
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
| Initialize libsodium in the gtest suite. | Initialize libsodium in the gtest suite.
| C++ | mit | aniemerg/zcash,loxal/zcash,bitcoinsSG/zcash,aniemerg/zcash,loxal/zcash,CTRoundTable/Encrypted.Cash,aniemerg/zcash,bitcoinsSG/zcash,aniemerg/zcash,bitcoinsSG/zcash,aniemerg/zcash,CTRoundTable/Encrypted.Cash,CTRoundTable/Encrypted.Cash,CTRoundTable/Encrypted.Cash,loxal/zcash,bitcoinsSG/zcash,bitcoinsSG/zcash,CTRoundTable... |
a8efb0a79dcfabac80b515823bf021fd3be57c48 | src/core/StateCell.cpp | src/core/StateCell.cpp | #include "../../include/core/StateCell.hpp"
#include "../../include/core/Cell.hpp"
bool StateCell::isState(StateCell* state) const
{
return state == this; //All state are singletons, so if state has the same class as this, it is the same instance
}
EmptyCell::EmptyCell()
{}
EmptyCell* EmptyCell::instance = new Emp... | #include "../../include/core/StateCell.hpp"
#include "../../include/core/Cell.hpp"
bool StateCell::isState(StateCell* state) const
{
return state == this; //All state are singletons, so if state has the same class as this, it is the same instance
}
EmptyCell::EmptyCell()
{}
EmptyCell* EmptyCell::instance = new Emp... | Modify states methods to implement the game of life | Modify states methods to implement the game of life
| C++ | mit | Matthieu-Riou/Casper |
66b4e64dff863ce67195e82f081b3a6afd786e27 | tests/inefficient-qlist/main.cpp | tests/inefficient-qlist/main.cpp | #include <QtCore/QList>
struct SmallType {
char a[8];
};
struct BigType {
char a[9];
};
void foo()
{
QList<BigType> bigT; // Warning
QList<SmallType> smallT; // OK
}
class A {
public:
void foo()
{
m_big.clear();
}
QList<BigType> m_big; // Warning
};
void foo1(QLi... | #include <QtCore/QList>
struct SmallType {
char a[8];
};
struct BigType {
char a[9];
};
void foo()
{
QList<BigType> bigT; // Warning
QList<SmallType> smallT; // OK
}
class A {
public:
void foo()
{
m_big.clear();
}
QList<BigType> m_big; // Warning
};
void foo1(QLi... | Add test-case for a bug report | inefficient-qlist: Add test-case for a bug report
CCBUG: 358740
| C++ | lgpl-2.1 | nyalldawson/clazy,nyalldawson/clazy,nyalldawson/clazy,nyalldawson/clazy |
2b2b33b2ca13241bede3fd826113a6135f8e5c9a | src/Tests/NativeTestLibrary/dllmain.cpp | src/Tests/NativeTestLibrary/dllmain.cpp | // dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
#include "commctrl.h"
#include "accctrl.h"
BOOL APIENTRY DllMain(
HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_TH... | // dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
#include "commctrl.h"
#include "accctrl.h"
#include "shellapi.h"
#include "shlobj.h"
BOOL APIENTRY DllMain(
HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
ca... | Add shell includes to test project for searching purposes | Add shell includes to test project for searching purposes
| C++ | mit | JeremyKuhne/WInterop,JeremyKuhne/WInterop,JeremyKuhne/WInterop,JeremyKuhne/WInterop |
9eb93525946121bced222f240082ff414dc4b9e7 | test/unit/logging.cc | test/unit/logging.cc | #include "test.h"
// When defining a facility, it has to occur before including the logger.
#define VAST_LOG_FACILITY "test"
#include "vast/logger.h"
#if VAST_LOG_LEVEL >= 5
using namespace vast;
int foo()
{
VAST_ENTER();
VAST_RETURN(-1);
return -1;
};
void bar(int i, std::string s, char c)
{
VAST_ENTER(VA... | #include "test.h"
// When defining a facility, it has to occur before including the logger.
#define VAST_LOG_FACILITY "test"
#include "vast/logger.h"
#if VAST_LOG_LEVEL > 5
using namespace vast;
int foo()
{
VAST_ENTER();
VAST_RETURN(-1);
return -1;
};
void bar(int i, std::string s, char c)
{
VAST_ENTER(VAS... | Define tracing unit tests with proper log level. | Define tracing unit tests with proper log level.
| C++ | bsd-3-clause | mavam/vast,vast-io/vast,vast-io/vast,pmos69/vast,vast-io/vast,pmos69/vast,mavam/vast,mavam/vast,mavam/vast,pmos69/vast,vast-io/vast,pmos69/vast,vast-io/vast |
4f4dc1fa6d0b30630b43b69508688a0d91ef29d6 | 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 %t1.so
// RUN: %clangxx_asan -fno-rtti -DBUILD_SO2 -fPIC -shared %s -o %t2.so
// RUN: %clangxx_asan -fno-rtti %t1.so %t2.so %s -Wl,-R. -o %t
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2 not %run %t 2>&1 | FileCheck %s
struct XYZ {... | // FIXME: Same as test/asan/TestCases/Linux/odr-violation.cc ?
// XFAIL: android
// RUN: %clangxx_asan -fno-rtti -DBUILD_SO1 -fPIC -shared %s -o %t1.so
// RUN: %clangxx_asan -fno-rtti -DBUILD_SO2 -fPIC -shared %s -o %t2.so
// RUN: %clangxx_asan -fno-rtti %t1.so %t2.so %s -Wl,-R. -o %t
// RUN: %env_asan_opts=fast_unwin... | Disable ODR test on Android | [asan] Disable ODR test on Android
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@349585 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 |
016d1338998e87196e8f43baaa2d8713f672b55d | polaris_block/src/PolarisBlock.cpp | polaris_block/src/PolarisBlock.cpp | #include "PolarisBlock.h"
#include "Poco/Net/ServerSocket.h"
#include "Poco/Net/SocketReactor.h"
#include "Poco/Net/SocketAcceptor.h"
#include "PolarisConnection.h"
using Poco::Net::ServerSocket;
using Poco::Net::SocketReactor;
using Poco::Net::SocketAcceptor;
using Poco::Thread;
int main(int argc, char** argv) {
... | #include "PolarisBlock.h"
#include "Poco/Net/ServerSocket.h"
#include "Poco/Net/SocketReactor.h"
#include "Poco/Net/SocketAcceptor.h"
#include "Poco/Thread.h"
#include "PolarisConnection.h"
using Poco::Net::ServerSocket;
using Poco::Net::SocketReactor;
using Poco::Net::SocketAcceptor;
using Poco::Thread;
int main(in... | Add thread to fix gcc | Add thread to fix gcc
| C++ | agpl-3.0 | PolarisTeam/PolarisLegacy,PolarisTeam/PolarisLegacy |
00826536d7b5abe63a07b8ed596ee422c011d04b | src/quasigame.cpp | src/quasigame.cpp | #include "quasigame.h"
#include "gamescene.h"
QuasiGame::QuasiGame(QQuickItem *parent)
: QQuickItem(parent)
, m_currentScene(0)
, m_fps(DEFAULT_FPS)
{
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(onUpdate()));
m_gameTime.start();
m_updateTimer.start(1000 / m_fps);
}
GameScene *QuasiGa... | #include "quasigame.h"
#include "gamescene.h"
QuasiGame::QuasiGame(QQuickItem *parent)
: QQuickItem(parent)
, m_currentScene(0)
, m_fps(DEFAULT_FPS)
{
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(onUpdate()));
m_gameTime.start();
m_updateTimer.start(1000 / m_fps);
}
GameScene *QuasiGa... | Check properties changes before emitting notify signal | Check properties changes before emitting notify signal
| C++ | mit | arcrowel/Bacon2D,kenvandine/Bacon2D,paulovap/Bacon2D,kenvandine/Bacon2D,paulovap/Bacon2D,arcrowel/Bacon2D |
211628996bec086c334f35c1a87bc4466942721f | platform/android/Rhodes/jni/src/mapview.cpp | platform/android/Rhodes/jni/src/mapview.cpp | #include "JNIRhodes.h"
#include "gapikey.h"
#include <common/rhoparams.h>
#undef DEFAULT_LOGCATEGORY
#define DEFAULT_LOGCATEGORY "MapView"
RHO_GLOBAL void mapview_create(rho_param *p)
{
#ifdef GOOGLE_API_KEY
jclass clsMapView = getJNIClass(RHODES_JAVA_CLASS_MAPVIEW);
if (!clsMapView) return;
jmethodID m... | #include "JNIRhodes.h"
#include "gapikey.h"
#include <common/rhoparams.h>
#undef DEFAULT_LOGCATEGORY
#define DEFAULT_LOGCATEGORY "MapView"
extern "C" void alert_show_popup(char *);
RHO_GLOBAL void mapview_create(rho_param *p)
{
#ifdef GOOGLE_API_KEY
jclass clsMapView = getJNIClass(RHODES_JAVA_CLASS_MAPVIEW);
... | Add alert when Google API key was not specified | Add alert when Google API key was not specified
| C++ | mit | louisatome/rhodes,louisatome/rhodes,jdrider/rhodes,rhosilver/rhodes-1,UIKit0/rhodes,rhosilver/rhodes-1,rhosilver/rhodes-1,jdrider/rhodes,rhosilver/rhodes-1,louisatome/rhodes,louisatome/rhodes,nosolosoftware/rhodes,jdrider/rhodes,UIKit0/rhodes,rhosilver/rhodes-1,rhosilver/rhodes-1,UIKit0/rhodes,rhosilver/rhodes-1,nosolo... |
468747efc2f1d6acfd26e8e8ef4d09d9f667b544 | tensorflow/core/kernels/cwise_op_sinh.cc | tensorflow/core/kernels/cwise_op_sinh.cc | /* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
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 law or a... | /* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
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 law or a... | Fix registration of Sinh GPU Eigen kernel | Fix registration of Sinh GPU Eigen kernel
PiperOrigin-RevId: 378123173
Change-Id: Ibcc42c7324fb30132790aa74b166d1807d717dd3
| C++ | apache-2.0 | tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,sar... |
0ce4324420095a25dc20bed3db6d763ab7267185 | src/main/android/SDL_android_main.cpp | src/main/android/SDL_android_main.cpp |
/* Include the SDL main definition header */
#include "SDL_main.h"
/*******************************************************************************
Functions called by JNI
*******************************************************************************/
#include <jni.h>
// Called before SDL_main() to... |
/* Include the SDL main definition header */
#include "SDL_main.h"
/*******************************************************************************
Functions called by JNI
*******************************************************************************/
#include <jni.h>
// Called before SDL_main() to... | Make sure we shut down the app if SDL_main() returns instead of exiting. | Make sure we shut down the app if SDL_main() returns instead of exiting.
| C++ | lgpl-2.1 | aduros/SDL,aduros/SDL,cebash/SDL_PSL1GHT,aduros/SDL,cebash/SDL_PSL1GHT,cebash/SDL_PSL1GHT,aduros/SDL,cebash/SDL_PSL1GHT,aduros/SDL,cebash/SDL_PSL1GHT |
00fe29604e0799a76090f3ce30afa269ea65a960 | deal.II/deal.II/source/grid/geometry_info.cc | deal.II/deal.II/source/grid/geometry_info.cc | /* $Id$ */
#include <grid/geometry_info.h>
// enable these lines for gcc2.95
//
//const unsigned int GeometryInfo<deal_II_dimension>::vertices_per_cell;
//const unsigned int GeometryInfo<deal_II_dimension>::lines_per_cell;
//const unsigned int GeometryInfo<deal_II_dimension>::quads_per_cell;
//const unsigned int Geo... | /* $Id$ */
#include <grid/geometry_info.h>
const unsigned int GeometryInfo<deal_II_dimension>::vertices_per_cell;
const unsigned int GeometryInfo<deal_II_dimension>::lines_per_cell;
const unsigned int GeometryInfo<deal_II_dimension>::quads_per_cell;
const unsigned int GeometryInfo<deal_II_dimension>::hexes_per_cell;... | Use actual definitions of static variables. | Use actual definitions of static variables.
git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@2445 0785d39b-7218-0410-832d-ea1e28bc413d
| C++ | lgpl-2.1 | johntfoster/dealii,ibkim11/dealii,pesser/dealii,johntfoster/dealii,spco/dealii,rrgrove6/dealii,kalj/dealii,natashasharma/dealii,shakirbsm/dealii,jperryhouts/dealii,shakirbsm/dealii,angelrca/dealii,danshapero/dealii,Arezou-gh/dealii,nicolacavallini/dealii,Arezou-gh/dealii,ESeNonFossiIo/dealii,johntfoster/dealii,adamkosi... |
1a38b6f3f33c143fc88d33c7c65fc37566fd739b | src/ports/SkFontHost_sandbox_none.cpp | src/ports/SkFontHost_sandbox_none.cpp | /*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkFontHost.h"
#include "SkTypeface.h"
#include "SkTypeface_win.h"
//static
void SkFontHost::EnsureTypefaceAccessible(const SkTypeface& typeface) {
//No sandbox,... | /*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkFontHost.h"
#include "SkTypeface.h"
//static
void SkFontHost::EnsureTypefaceAccessible(const SkTypeface& typeface) {
//No sandbox, nothing to do.
}
| Remove unneeded include which is breaking build. | Remove unneeded include which is breaking build.
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@2694 2bbb7eff-a529-9590-31e7-b0007b416f81
| C++ | bsd-3-clause | Cue/skia,mrobinson/skia,mrobinson/skia,metajack/skia,metajack/skia,metajack/skia,mrobinson/skia,mrobinson/skia,Cue/skia,mrobinson/skia,Cue/skia,metajack/skia,Cue/skia |
eeab43dace27bdcd89238300002f0560008f2824 | example1/Example1.cpp | example1/Example1.cpp | #include "Example1.h"
#include <string.h>
#include <GLES3/gl3.h>
#include <jni.h>
#include <iostream>
#include <glm/gtc/matrix_transform.hpp>
#include <shader_program.h>
using namespace std;
bool
Example1::Init() {
}
void
Example1::onDraw() {
}
void
Example1::onShutdown() {
}
std::shared_ptr<Example1> application... | #include "Example1.h"
#include <string.h>
#include <GLES3/gl3.h>
#include <jni.h>
#include <iostream>
#include <glm/gtc/matrix_transform.hpp>
#include <shader_program.h>
#include <Context.h>
#include <AndroidPlatform.h>
#include <ContextAndroid.h>
using namespace std;
bool
Example1::Init() {
}
void
Example1::onDraw... | Add includes to use debugging showCanvas | Add includes to use debugging showCanvas | C++ | mit | Sometrik/framework,Sometrik/framework,Sometrik/framework |
42a8297686346019e7c44aecd30f1146534124ca | src/driver/servo_krs/src/servo_krs_node.cpp | src/driver/servo_krs/src/servo_krs_node.cpp | #include<ros/ros.h>
#include<ics3/ics>
#include<servo_msgs/IdBased.h>
ics::ICS3* driver {nullptr};
ros::Publisher pub;
void move(const servo_msgs::IdBased::ConstPtr& msg) {
auto degree = ics::Angle::newDegree(msg->angle);
auto nowpos = driver->move(msg->id, degree);
servo_msgs::IdBased result;
result.id = msg... | #include<ros/ros.h>
#include<ics3/ics>
#include<servo_msgs/IdBased.h>
ics::ICS3* driver {nullptr};
ros::Publisher pub;
void move(const servo_msgs::IdBased::ConstPtr& msg) {
auto degree = ics::Angle::newDegree(msg->angle);
try {
auto nowpos = driver->move(msg->id, degree);
servo_msgs::IdBased result;
r... | Add try block for receive error on connection | Add try block for receive error on connection
On subscribe, ICS3 have connection of ics communication.
It mean exist USB adaptor but fail servo motor.
So we save connection.
| C++ | mit | agrirobo/arcsys2,agrirobo/arcsys2 |
3212f105f61f80e34c1d1bcfddef8170b8f137ed | src/gui/GuiButton.cpp | src/gui/GuiButton.cpp | //
// Created by dar on 1/25/16.
//
#include "GuiButton.h"
GuiButton::GuiButton(int x, int y, int width, int height) {
this->x = x;
this->y = y;
this->width = width;
this->height = height;
}
bool virtual GuiButton::onClick(int action, float x, float y) {
if (onClickListener == NULL) return false;... | //
// Created by dar on 1/25/16.
//
#include "GuiButton.h"
GuiButton::GuiButton(int x, int y, int width, int height) {
this->x = x;
this->y = y;
this->width = width;
this->height = height;
}
bool GuiButton::onClick(int action, float x, float y) {
if (onClickListener == NULL) return false;
ret... | Fix 'virtual out of class' error | Fix 'virtual out of class' error
| C++ | mit | darsto/spooky,darsto/spooky |
6c38f6689223684909d506debcfab3c76b09b1e4 | test/SemaCXX/cxx-deprecated.cpp | test/SemaCXX/cxx-deprecated.cpp | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++1z %s
namespace [[deprecated]] {} // expected-warning {{'deprecated' attribute on anonymous namespace ignored}}
namespace [[deprecated]] N { // expected-note 4{{'N' has been explicitly marked deprecated here}}
int X;
int Y = X; // Ok
int f();
}
int N::f() { // ... | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++1z %s
namespace [[deprecated]] {} // expected-warning {{'deprecated' attribute on anonymous namespace ignored}}
namespace [[deprecated]] N { // expected-note 4{{'N' has been explicitly marked deprecated here}}
int X;
int Y = X; // Ok
int f();
}
int N::f() { // ... | Add regression test for PR37935. | Add regression test for PR37935.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@335725 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-cl... |
38a1390e817e5d99860fdd4909091d0bd84591a9 | src/vm/genfunction.cc | src/vm/genfunction.cc | #include "object/object.h"
#include "object/jsobject.h"
#include "object/function.h"
#include "parser/functionstatement.h"
#include "vm/instruction-builder.h"
#include "vm/instruction.h"
#include "vm/context.h"
#include "vm/vm.h"
namespace grok {
namespace parser {
using namespace grok::vm;
using namespace grok::obj;... | #include "object/object.h"
#include "object/jsobject.h"
#include "object/function.h"
#include "parser/functionstatement.h"
#include "vm/instruction-builder.h"
#include "vm/instruction.h"
#include "vm/context.h"
#include "vm/vm.h"
namespace grok {
namespace parser {
using namespace grok::vm;
using namespace grok::obj;... | Allow unnamed function and their assigning to other values | Allow unnamed function and their assigning to other values
| C++ | apache-2.0 | PrinceDhaliwal/grok,PrinceDhaliwal/grok,PrinceDhaliwal/grok |
86eaa1bf3f21b8052bfad82abd46ff00b44c4262 | You-Controller/internal/query_executor.cpp | You-Controller/internal/query_executor.cpp | //@author A0097630B
#include "stdafx.h"
#include "query_executor.h"
namespace You {
namespace Controller {
namespace Internal {
QueryExecutor::QueryExecutor(std::unique_ptr<You::QueryEngine::Query>&& query) {
}
Result QueryExecutor::execute() {
QueryEngine::Response response = QueryEngine::executeQuery(
std::move... | //@author A0097630B
#include "stdafx.h"
#include "query_executor.h"
namespace You {
namespace Controller {
namespace Internal {
QueryExecutor::QueryExecutor(std::unique_ptr<You::QueryEngine::Query>&& query)
: query(std::move(query)) {
}
Result QueryExecutor::execute() {
QueryEngine::Response response = QueryEngine:... | Store the query that is to be executed later. | Store the query that is to be executed later.
| C++ | mit | cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main |
7b91b2c561c2cfbd28e465a29837db272a6b5137 | windows/src/InitialExperience/SdkModel/WindowsInitialExperienceModule.cpp | windows/src/InitialExperience/SdkModel/WindowsInitialExperienceModule.cpp | // Copyright eeGeo Ltd (2012-2015), All Rights Reserved
#include "WindowsInitialExperienceModule.h"
#include "WindowsInitialExperiencePreLoadModel.h"
#include "InitialExperienceIntroStep.h"
//#include "InitialExperienceSearchResultAttractModeModel.h"
namespace ExampleApp
{
namespace InitialExperience
{
... | // Copyright eeGeo Ltd (2012-2015), All Rights Reserved
#include "WindowsInitialExperienceModule.h"
#include "WindowsInitialExperiencePreLoadModel.h"
#include "InitialExperienceIntroStep.h"
//#include "InitialExperienceSearchResultAttractModeModel.h"
#include "WorldPinVisibility.h"
namespace ExampleApp
{
namespac... | Fix for missing Hovercards in Windows. Buddy: Mark | Fix for missing Hovercards in Windows. Buddy: Mark
| C++ | bsd-2-clause | eegeo/eegeo-example-app,eegeo/eegeo-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,wrld3d/wrld-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,eegeo/ee... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.