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 |
|---|---|---|---|---|---|---|---|---|---|
0a8447231f27f02d0ff30720e66e0e6517bc584b | lib/stego-crypt-lib/wav_embedding_agent.cc | lib/stego-crypt-lib/wav_embedding_agent.cc | #include "wav_embedding_agent.hh"
void WAV_embedding_agent::embed() {
// TODO: implement
}
void WAV_embedding_agent::save() const {
// TODO: implement
}
std::vector<unsigned> WAV_embedding_agent::message_to_masks(const std::string& msg, Mask_type mask_type) {
// TODO: implement
// do fun things until we impl... | #include "wav_embedding_agent.hh"
void WAV_embedding_agent::embed() {
// TODO: implement
}
void WAV_embedding_agent::save() const {
// TODO: implement
}
std::vector<unsigned> WAV_embedding_agent::message_to_masks(const std::string& msg, Mask_type mask_type) {
// TODO: implement
// do fun things until we impl... | Make message size check return true to not break tests | Make message size check return true to not break tests
| C++ | bsd-3-clause | gwydirsam/DickGrayson,gwydirsam/DickGrayson,gwydirsam/DickGrayson |
6043e0fa12bf58ef701455c26ffbe18fe56d628c | core/vulkan/vk_memory_tracker_layer/cc/memory_tracker_helpers.cpp | core/vulkan/vk_memory_tracker_layer/cc/memory_tracker_helpers.cpp | /*
* Copyright (C) 2019 Google 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://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | /*
* Copyright (C) 2019 Google 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://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Fix duplicate symbol in memory tracker. | Fix duplicate symbol in memory tracker.
| C++ | apache-2.0 | google/gapid,google/gapid,google/agi,google/agi,google/gapid,google/agi,google/gapid,google/agi,google/gapid,google/gapid,google/gapid,google/gapid,google/agi,google/agi,google/agi,google/agi |
4b954f98d657c0eda2049dce6a3e648b2ce9f80b | src/box2dbaseitem.cpp | src/box2dbaseitem.cpp | #include "box2dbaseitem.h"
#include "util.h"
#include <Box2D/Box2D.h>
float Box2DBaseItem::m_scaleRatio = 32.0f;
Box2DBaseItem::Box2DBaseItem(GameScene *parent )
: GameItem(parent)
, m_initialized(false)
, m_synchronizing(false)
, m_synchronize(true)
{
}
bool Box2DBaseItem::initialized() const
{
... | #include "box2dbaseitem.h"
#include "util.h"
#include <Box2D/Box2D.h>
float Box2DBaseItem::m_scaleRatio = 32.0f;
Box2DBaseItem::Box2DBaseItem(GameScene *parent )
: GameItem(parent)
, m_initialized(false)
, m_synchronizing(false)
, m_synchronize(true)
{
}
bool Box2DBaseItem::initialized() const
{
... | Use helper function to get the new rotation | Use helper function to get the new rotation
| C++ | mit | paulovap/Bacon2D,kenvandine/Bacon2D,paulovap/Bacon2D,arcrowel/Bacon2D,kenvandine/Bacon2D,arcrowel/Bacon2D |
c00d5a2ae2aac980619e893573639f80a39cac6e | src/Qumulus/Uml/Diagram/Diagram.cpp | src/Qumulus/Uml/Diagram/Diagram.cpp | /*
* Qumulus UML editor
* Author: Frank Erens
*
*/
#include "Diagram.h"
#include "Style.h"
QUML_BEGIN_NAMESPACE_UD
Diagram::Diagram(QString name, double resolution) :
mName(name),
mResolution(resolution) {
auto s = new Style;
setLocalStyle(s);
s->setFontName("sans-serif");
s->setF... | /*
* Qumulus UML editor
* Author: Frank Erens
*
*/
#include "Diagram.h"
#include "Style.h"
QUML_BEGIN_NAMESPACE_UD
constexpr static float kFontSize =
#ifdef Q_OS_MAC
12.0;
#else
10.0;
#endif
Diagram::Diagram(QString name, double resolution) :
mName(name),
mResolution(resolution) ... | Set font size correctly on Mac and non-Mac. | Set font size correctly on Mac and non-Mac.
| C++ | apache-2.0 | SynthiNet/Qumulus,SynthiNet/Qumulus,SynthiNet/Qumulus,SynthiNet/Qumulus |
f0ae6c62e8cd53ef8c81f87e3a7abb0d15b6775b | lib/Support/IsInf.cpp | lib/Support/IsInf.cpp | //===-- IsInf.cpp ---------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===--------... | //===-- IsInf.cpp ---------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===--------... | Patch to support MSVC, contributed by Morten Ofstad | Patch to support MSVC, contributed by Morten Ofstad
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@17220 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm... |
d67f4ff481d21be3290c1cba8aef94a31289fb98 | content/public/utility/utility_thread.cc | content/public/utility/utility_thread.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/public/utility/utility_thread.h"
#include "base/lazy_instance.h"
#include "base/threading/thread_local.h"
namespace content {
// ... | // 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/public/utility/utility_thread.h"
#include "base/lazy_instance.h"
#include "base/threading/thread_local.h"
namespace content {
// ... | Make the lazy TLS pointer to UtilityThread into a LeakyLazyInstance. | Make the lazy TLS pointer to UtilityThread into a LeakyLazyInstance.
Try to fix a NULL dereference which is likely caused by the utility thread
living past AtExit.
BUG=272753
R=joi@chromium.org
Review URL: https://chromiumcodereview.appspot.com/23448010
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@220043 00... | C++ | bsd-3-clause | Chilledheart/chromium,ondra-novak/chromium.src,markYoungH/chromium.src,anirudhSK/chromium,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,littlstar/chromium.src,markYoungH/chromium.src,ltilve/chromium,M4sse/chromium.src,krieg... |
898ccad39e6f47b2be26f9fa2cc9b45c2026388a | src/cpp/properties/ConnectedComponents.cpp | src/cpp/properties/ConnectedComponents.cpp | /*
* ConnectedComponents.cpp
*
* Created on: Dec 16, 2013
* Author: cls
*/
#include <set>
#include "ConnectedComponents.h"
#include "../structures/Partition.h"
#include "../auxiliary/Log.h"
namespace NetworKit {
ConnectedComponents::ConnectedComponents(const Graph& G) : G(G), numComponents(0) {
}
void C... | /*
* ConnectedComponents.cpp
*
* Created on: Dec 16, 2013
* Author: cls
*/
#include <set>
#include "ConnectedComponents.h"
#include "../structures/Partition.h"
#include "../auxiliary/Log.h"
namespace NetworKit {
ConnectedComponents::ConnectedComponents(const Graph& G) : G(G), numComponents(0) {
}
void C... | Change connected components to assign component ids starting at 0 | Change connected components to assign component ids starting at 0
Previously component ids were starting at 1, this was a problem in the
diameter algorithm where the ids were assumed to start at 0 (but somehow
it still worked for some graphs).
| C++ | mit | fmaschler/networkit,fmaschler/networkit,fmaschler/networkit,fmaschler/networkit,fmaschler/networkit,fmaschler/networkit |
9ff6ca8d4dee0a014e5da47866734567b09944e0 | test/correctness/thread_safety.cpp | test/correctness/thread_safety.cpp | #include "Halide.h"
#include <stdio.h>
#include <thread>
using namespace Halide;
int main(int argc, char **argv) {
// Test if the compiler itself is thread-safe. This test is
// intended to be run in a thread-sanitizer.
std::vector<std::thread> threads;
for (int i = 0; i < 1000; i++) {
threads... | #include "Halide.h"
#include <stdio.h>
#include <future>
using namespace Halide;
static std::atomic<int> foo;
int main(int argc, char **argv) {
// Test if the compiler itself is thread-safe. This test is
// intended to be run in a thread-sanitizer.
std::vector<std::future<void>> futures;
for (int i =... | Use std::async() instead of std::thread() | Use std::async() instead of std::thread()
It is guaranteed to use a pool-like behavior; to ensure that every task
is executed by spawning a new thread, we must explicitly specify
std::launch::async.
Former-commit-id: 4236c652b3d581ce8b6851efd4653cb815c4ac70 | C++ | mit | Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide |
43ab5664aa7ad42fa32fa7a4bd825f815df144fe | libevmjit/Runtime.cpp | libevmjit/Runtime.cpp |
#include "Runtime.h"
#include <llvm/IR/GlobalVariable.h>
#include <llvm/IR/Function.h>
#include <llvm/IR/IntrinsicInst.h>
namespace dev
{
namespace eth
{
namespace jit
{
Runtime::Runtime(RuntimeData* _data, Env* _env) :
m_data(*_data),
m_env(*_env),
m_currJmpBuf(m_jmpBuf)
{}
bytes Runtime::getReturnData() const... |
#include "Runtime.h"
#include <llvm/IR/GlobalVariable.h>
#include <llvm/IR/Function.h>
#include <llvm/IR/IntrinsicInst.h>
namespace dev
{
namespace eth
{
namespace jit
{
Runtime::Runtime(RuntimeData* _data, Env* _env) :
m_data(*_data),
m_env(*_env),
m_currJmpBuf(m_jmpBuf)
{}
bytes Runtime::getReturnData() const... | Handle return memory of size 0 and large offset | Handle return memory of size 0 and large offset
| C++ | mit | ethereum/evmjit,ethereum/evmjit,ethereum/evmjit |
620290faf9e9e7407aac4f5a693515ac386b833f | net/base/network_change_notifier_helper.cc | net/base/network_change_notifier_helper.cc | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/base/network_change_notifier_helper.h"
#include <algorithm>
#include "base/logging.h"
namespace net {
namespace internal {
NetworkCha... | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/base/network_change_notifier_helper.h"
#include <algorithm>
#include "base/logging.h"
namespace net {
namespace internal {
NetworkCha... | Disable DCHECK'ing that all NetworkChangeNotifiers are removed. BUG=34391 | Disable DCHECK'ing that all NetworkChangeNotifiers are removed.
BUG=34391
Review URL: http://codereview.chromium.org/560026
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@37982 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | yitian134/chromium,ropik/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chr... |
e38402826642491c955b458a9cbc0884f394844f | tests/geocode.cc | tests/geocode.cc | #include "geocoder.h"
#include <stdio.h>
using namespace std;
int main(int argc, char *argv[])
{
if (argc < 3)
{
printf("USAGE: %s <geodb> <expression>\n", argv[0]);
return 1;
}
GeoCoder g(argv[1]);
pair<float, float> *latlng = g.get_latlng(argv[2]);
printf("%f, %f\n", latln... | #include "geocoder.h"
#include <stdio.h>
using namespace std;
int main(int argc, char *argv[])
{
if (argc < 3)
{
printf("USAGE: %s <geodb> <expression>\n", argv[0]);
return 1;
}
GeoCoder g(argv[1]);
pair<float, float> *latlng = g.get_latlng(argv[2]);
if (latlng)
pri... | Print not found when coordinates not found | Print not found when coordinates not found
(i.e. don't crash)
| C++ | mit | wlach/neocoder,wlach/neocoder,wlach/neocoder,wlach/neocoder,wlach/neocoder,wlach/neocoder |
532c522ebb8286ad55bc879f06a0e71d8dc739e2 | ionScene/CMeshComponent.cpp | ionScene/CMeshComponent.cpp |
#include "CMeshComponent.h"
#include "CGLGraphicsEngine.h"
CMeshComponent::CMeshComponent(CMesh * Mesh, ion::GL::Program * Shader)
{
this->Mesh = Mesh;
this->Shader = Shader;
}
void CMeshComponent::Update(CSceneNode * Node)
{}
void CMeshComponent::Draw(CSceneNode * Node, IGraphicsEngine * Engine... |
#include "CMeshComponent.h"
#include "CGLGraphicsEngine.h"
CMeshComponent::CMeshComponent(CMesh * Mesh, ion::GL::Program * Shader)
{
this->Mesh = Mesh;
this->Shader = Shader;
}
void CMeshComponent::Update(CSceneNode * Node)
{}
void CMeshComponent::Draw(CSceneNode * Node, IGraphicsEngine * Engine... | Send actual node transformation as Model matrix | Send actual node transformation as Model matrix
--HG--
branch : SceneOverhaul
| C++ | mit | iondune/ionEngine,iondune/ionEngine |
69431f3a166027dd61b66736e2e7cfbaaebcd71d | helloworld.cpp | helloworld.cpp | #include <iostream>
#include <vector>
#include <CL/cl.hpp>
void checkErr(cl_int err, const char *name)
{
if (err == CL_SUCCESS)
return;
std::cerr << "[ERROR] In " << name << ", with code: " << err << std::endl;
exit(1);
}
int main(int argc, char **argv)
{
cl_int err;
std::vector<cl::Platform> platformList;
... | #include <iostream>
#include <vector>
#include <CL/cl.hpp>
#define TOKENPASTE(x, y) x ## y
#define TOKENPASTE2(x, y) TOKENPASTE(x, y)
#ifndef TARGET_PLATFORM
# define TARGET_PLATFORM GPU
#endif
#define CONCAT(A, B) A ## B
#define GET_TARGET_PLATFORM TOKENPASTE2(CL_DEVICE_TYPE_, TARGET_PLATFORM)
void checkErr(cl_in... | Add TARGET_PLATFORM macro for target selection | Add TARGET_PLATFORM macro for target selection
| C++ | mit | TAdeJong/OpenCLproj,TAdeJong/OpenCLproj |
029593867b5d680d6f77351a9056fbe9646a9c5b | libnes/ram.cpp | libnes/ram.cpp | #include "ram.h"
#include "memorymap.h"
#include <cstring>
#include <cassert>
RAM::RAM(uint8_t * const ram, size_t size) : ram(ram), size(size) {
assert(size == MemoryMap::RAM_MIRROR_START);
(void)std::memset(ram, 0U, size);
}
RAM::~RAM() {
}
// --------------------------------------------------------------... | #include "ram.h"
#include "memorymap.h"
#include <cstring>
#include <cassert>
// ---------------------------------------------------------------------------------------------- //
RAM::RAM(uint8_t * const ram, size_t size) : ram(ram), size(size) {
assert(size > 0);
(void)std::memset(ram, 0U, size);
}
// ------... | Make RAM class reusable between cpu and ppu | Make RAM class reusable between cpu and ppu
| C++ | mit | am1ko/nes,am1ko/nes |
11bd5f9466b50389d28a665772cbb1b1b28d086e | cpp/directory_entry.cc | cpp/directory_entry.cc | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ppapi/cpp/directory_entry.h"
#include "ppapi/cpp/module.h"
namespace pp {
DirectoryEntry::DirectoryEntry() {
memset(&data_, 0, sizeof(d... | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ppapi/cpp/directory_entry.h"
#include <string.h>
#include "ppapi/cpp/module.h"
namespace pp {
DirectoryEntry::DirectoryEntry() {
memse... | Fix the linux build by adding a string.h include. | Fix the linux build by adding a string.h include.
TBR=brettw
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2836024 | C++ | bsd-3-clause | tonyjoule/ppapi,rise-worlds/ppapi,huqingyu/ppapi,siweilvxing/ppapi,ruder/ppapi,huochetou999/ppapi,xinghaizhou/ppapi,xinghaizhou/ppapi,ruder/ppapi,chenfeng8742/ppapi,YachaoLiu/ppapi,qwop/ppapi,thdtjsdn/ppapi,huochetou999/ppapi,phisixersai/ppapi,stefanie924/ppapi,JustRight/ppapi,stefanie924/ppapi,gwobay/ppapi,rise-worlds... |
8c6e35cf2c55f0605b08bd8975f50d3dfea63e06 | test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp | test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.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 when modules are enabled | Fix test when modules are enabled
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@305445 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
508c49cf9a284627d19764dfc55322b61be40d3c | solutions/uri/2161/2161.cpp | solutions/uri/2161/2161.cpp | #include <iomanip>
#include <iostream>
double sqrtt(int n) {
double result = 1 / 6;
for (int i = 0; i < n; i++) {
result = 1 / (6 + result);
}
return result + 3;
}
int main() {
int n;
while (std::cin >> n) {
std::cout << std::fixed << std::setprecision(10) << sqrtt(n)
... | #include <iomanip>
#include <iostream>
double sqrtt(int n) {
double result = 0.0;
for (int i = 0; i < n; i++) {
result = 1 / (6 + result);
}
return result + 3;
}
int main() {
int n;
while (std::cin >> n) {
std::cout << std::fixed << std::setprecision(10) << sqrtt(n)
... | Improve solution to avoid misinterpretation | Improve solution to avoid misinterpretation
| C++ | mit | deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr... |
a5665a07e4194bb5468896ab533150d5e6664a16 | test/msan/vector_cvt.cc | test/msan/vector_cvt.cc | // RUN: %clangxx_msan -O0 %s -o %t && %run %t
// RUN: %clangxx_msan -DPOSITIVE -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
#include <emmintrin.h>
int to_int(double v) {
__m128d t = _mm_set_sd(v);
int x = _mm_cvtsd_si32(t);
return x;
// CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
// CHECK... | // RUN: %clangxx_msan -O0 %s -o %t && %run %t
// RUN: %clangxx_msan -DPOSITIVE -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
// REQUIRES: x86_64-supported-target
#include <emmintrin.h>
int to_int(double v) {
__m128d t = _mm_set_sd(v);
int x = _mm_cvtsd_si32(t);
return x;
// CHECK: WARNING: MemorySanitizer: ... | Mark one test as only supported on x86 | [msan] Mark one test as only supported on x86
Summary: This test uses x86 intrinsics, so it can't work on other platforms.
Reviewers: garious, eugenis, samsonov
Reviewed By: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10652
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f... | C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
20e13275c24a0de17aea33714eb2fce17702cff1 | ui/aura/test/run_all_unittests.cc | ui/aura/test/run_all_unittests.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 "base/bind.h"
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
int main(int argc, char** argv) {
base:... | // 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 "base/bind.h"
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
#include "ui/gl/gl_surface.h"
int main(in... | Make aura_unittests opt into real GL NullDraw contexts. | aura: Make aura_unittests opt into real GL NullDraw contexts.
This breaks the dependency on the TestCompositor for
this test suite. Once it's no longer in use by any test
suite, we can remove it.
R=sky@chromium.org,ben@chromium.org
BUG=270918
Review URL: https://codereview.chromium.org/172623003
git-svn-id: de016e5... | C++ | bsd-3-clause | hgl888/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,mohamed--abd... |
6a4331567b7639b75927c963fbb676c918090308 | 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();
}
if (!isReplacing) {
_states.top()->pause();
}
_states.push(std::move(newState));... | #include "state_machine.hpp"
namespace kg {
void StateMachine::startState(StateRef newState, bool isReplacing) {
if (!_states.empty()) {
if (isReplacing) {
_states.pop();
} else {
_states.top()->pause();
}
}
_states.push(s... | Refactor adding a new state. | Refactor adding a new state.
| C++ | mit | kiswa/SFML_Starter |
e424982b74db6b573813d423675419d7c5c619f1 | chrome/browser/extensions/extension_function.cc | chrome/browser/extensions/extension_function.cc | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
void ExtensionFunctio... | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
void ExtensionFunctio... | Check that the ExtensionFunction has a callback for attempting to send a response. | Check that the ExtensionFunction has a callback for attempting to send a response.
Review URL: http://codereview.chromium.org/63130
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@13406 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | dushu1203/chromium.src,keishi/chromium,ChromiumWebApps/chromium,rogerwang/chromium,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,M4sse/chromium.src,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,keishi/chromium,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,axinging/chromium-crosswalk,F... |
ca5660d324e5faa4c795bd3d92a6bf61051b0af3 | src/certificate/randomgenerator.cpp | src/certificate/randomgenerator.cpp | #include <QFile>
#include "randomgenerator.h"
QT_BEGIN_NAMESPACE_CERTIFICATE
/*!
\class RandomGenerator
\brief The RandomGenerator class is a tool for creating hard random numbers.
The RandomGenerator class provides a source of secure random numbers using
the system's random source (/dev/random on UNIX). Th... | #include <QFile>
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>
#include "randomgenerator.h"
QT_BEGIN_NAMESPACE_CERTIFICATE
/*!
\class RandomGenerator
\brief The RandomGenerator class is a tool for creating hard random numbers.
The RandomGenerator class provides a source of secure random numbers using... | Switch from using /dev/random directly to use gnutls_rnd. | Switch from using /dev/random directly to use gnutls_rnd.
This removes the platform specific code, so we should be portable
again.
| C++ | lgpl-2.1 | richmoore/qt-certificate-addon,richmoore/qt-certificate-addon |
fc44306553e842e4ab98e490eeb93917d7b80926 | VFrame/V3DBatchModelGroup.cpp | VFrame/V3DBatchModelGroup.cpp | #include "V3DBatchModelGroup.h"
#ifndef VFRAME_NO_3D
#include "V3DCamera.h"
#include "V3DShader.h"
V3DBatchModelGroup::V3DBatchModelGroup(V3DObject* BaseObject, unsigned int MaxSize) : VGroup(MaxSize)
{
baseObject = BaseObject;
}
void V3DBatchModelGroup::Destroy()
{
VSUPERCLASS::Destroy();
delete baseObject;
}
v... | #include "V3DBatchModelGroup.h"
#ifndef VFRAME_NO_3D
#include "V3DCamera.h"
#include "V3DShader.h"
V3DBatchModelGroup::V3DBatchModelGroup(V3DObject* BaseObject, unsigned int MaxSize) : VGroup(MaxSize)
{
baseObject = BaseObject;
}
void V3DBatchModelGroup::Destroy()
{
VSUPERCLASS::Destroy();
delete baseObject;
}
v... | Add BoxInView call to end of if statement to remove an unnecessary branch. | Add BoxInView call to end of if statement to remove an unnecessary branch.
| C++ | mit | gamepopper/Vigilante-Game-Framework,gamepopper/Vigilante-Game-Framework |
d98614180b21fb54fac3079b0338d243dda0d8af | app/sproto/src/main.cc | app/sproto/src/main.cc | #include <sh.h>
#include <stdio.h>
int main(void) {
MCU_sw ic;
ic.led.set();
//ic.Uart.putch('H');
//ic.Uart.putch('e');
//ic.Uart.putch('l');
//ic.Uart.putch('l');
//ic.Uart.putch('o');
ic.stdio.setio(&ic.Uart);
icprintf("Hello world from printf\n");
while (1) {
if (ic.buttons.b1.isOn() ... | #include <sh.h>
#include <stdio.h>
int main(void) {
MCU_sw ic;
ic.led.set();
ic.stdio.setio(&ic.Uart);
icprintf("Hello world from printf\n");
while (1) {
if (ic.buttons.b1.isOn() != ic.buttons.b2.isOn()) {
ic.led.clr();
ic.relay.r1.set();
} else {
ic.led.set();
ic.relay.r1.... | Test for autogenerating GUI for C model | Test for autogenerating GUI for C model
| C++ | mit | BASM/sh,BASM/sh,BASM/sh,BASM/sh,BASM/sh |
103d056e96371f5555681bf2389f18030ae2f5d2 | Main.cpp | Main.cpp | // Native C++ Libraries
#include <iostream>
#include <string>
// C++ Interpreter Libraries
#include <Console.h>
| // Native C++ Libraries
#include <iostream>
#include <string>
// C++ Interpreter Libraries
#include <Console.h>
using namespace std;
int main()
{
}
| Add the rest of the standard C++ code to main file. | Add the rest of the standard C++ code to main file.
| C++ | mit | Project-CPP/CPP-Interpreter |
32f21bd4b65228e86a3f23e4036494bed1ca4961 | src/input/mouse_wheel_transition.cpp | src/input/mouse_wheel_transition.cpp | #include "./mouse_wheel_transition.h"
#include <QDebug>
MouseWheelTransition::MouseWheelTransition(QObject *object, QState *sourceState)
: QEventTransition(object, QEvent::Scroll, sourceState)
{
}
MouseWheelTransition::~MouseWheelTransition()
{
}
bool MouseWheelTransition::eventTest(QEvent *event)
{
qWarning() <... | #include "./mouse_wheel_transition.h"
#include <QDebug>
MouseWheelTransition::MouseWheelTransition(QObject *object, QState *sourceState)
: QEventTransition(object, QEvent::Wheel, sourceState)
{
}
MouseWheelTransition::~MouseWheelTransition()
{
}
bool MouseWheelTransition::eventTest(QEvent *event)
{
qWarning() <<... | Use right event type Wheel instead of Scroll. | Use right event type Wheel instead of Scroll.
| C++ | mit | Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller |
0fcfeabab1783f424027840f62d942435d4fd828 | ykman-gui/main.cpp | ykman-gui/main.cpp | #include <QApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <stdlib.h>
#include <QtGlobal>
#include <QtWidgets>
#include <QtSingleApplication>
int main(int argc, char *argv[])
{
QtSingleApplication app(argc, argv);
QQmlApplicationEngine engine;
app.setWindowIcon(QIcon("resource... | #include <QApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <stdlib.h>
#include <QtGlobal>
#include <QtWidgets>
#include <QtSingleApplication>
int main(int argc, char *argv[])
{
QtSingleApplication app(argc, argv);
if (app.isRunning()) {
return 0;
}
QQmlApplicationE... | Exit if multiple instances are running | Exit if multiple instances are running
| C++ | bsd-2-clause | Yubico/yubikey-manager-qt,Yubico/yubikey-manager-qt,Yubico/yubikey-manager-qt,Yubico/yubikey-manager-qt |
40a11af4feec84f471021780e0c61fb5fbcb766d | pal/src/map/common.cpp | pal/src/map/common.cpp | //
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
/*++
Module Name:
common.c
Abstract:
Implementation of the common mapping functions.
--*/
#include "pal/palinternal.h"
#include "pal/dbgmsg.h"
... | //
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
/*++
Module Name:
common.c
Abstract:
Implementation of the common mapping functions.
--*/
#include "pal/palinternal.h"
#include "pal/dbgmsg.h"
... | Fix Segmentation fault on Linux Skylake server | Fix Segmentation fault on Linux Skylake server
| C++ | mit | Microsoft/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore |
987db111e3d18d3511f80afc19c375b5b122e56f | deal.II/lac/source/sparse_decomposition.cc | deal.II/lac/source/sparse_decomposition.cc | //---------------------------- sparse_decomposition.cc ---------------------------
// Copyright (C) 1998, 1999, 2000, 2001, 2002
// by the deal.II authors and Stephen "Cheffo" Kolaroff
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
... | //---------------------------- sparse_decomposition.cc ---------------------------
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
// by the deal.II authors and Stephen "Cheffo" Kolaroff
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please ... | Add some missing explicit instantiations. | Add some missing explicit instantiations.
git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@6951 0785d39b-7218-0410-832d-ea1e28bc413d
| C++ | lgpl-2.1 | Arezou-gh/dealii,jperryhouts/dealii,shakirbsm/dealii,nicolacavallini/dealii,lpolster/dealii,YongYang86/dealii,pesser/dealii,ibkim11/dealii,mtezzele/dealii,lue/dealii,YongYang86/dealii,ibkim11/dealii,naliboff/dealii,YongYang86/dealii,andreamola/dealii,flow123d/dealii,johntfoster/dealii,natashasharma/dealii,rrgrove6/deal... |
d781e67d8c09ff30ba33e497b52cfa5979c003f8 | src/prime.cpp | src/prime.cpp | // Nikita Kouevda
// 2013/11/02
#include <cmath>
#include "prime.hpp"
using namespace std;
bool isPrime(long int n) {
if (n == 2 || n == 3) {
return 1;
} else if (n < 2 || n % 2 == 0 || n % 3 == 0) {
return 0;
}
for (long int i = 5, max = sqrt(n) + 1; i < max; i += 6) {
if (n % i == 0 || n % (i... | // Nikita Kouevda
// 2013/11/02
#include <cmath>
#include "prime.hpp"
using namespace std;
bool isPrime(long int n) {
if (n == 2 || n == 3) {
return true;
} else if (n < 2 || n % 2 == 0 || n % 3 == 0) {
return false;
}
for (long int i = 5, max = sqrt(n) + 1; i < max; i += 6) {
if (n % i == 0 ||... | Use true and false instead of 1 and 0. | Use true and false instead of 1 and 0.
| C++ | mit | nkouevda/prime,nkouevda/prime |
a9e67eb68791a3ad5408d44792b4b7425cf78d88 | source/loader/linux/driver_discovery_lin.cpp | source/loader/linux/driver_discovery_lin.cpp | /*
*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "source/loader/driver_discovery.h"
#include "source/inc/ze_util.h"
#include <iostream>
#include <sstream>
#include <string>
namespace loader {
static const char *knownDriverNames[] = {
MAKE_LIBRARY_NAME("ze_intel_gp... | /*
*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "source/loader/driver_discovery.h"
#include "source/inc/ze_util.h"
#include <iostream>
#include <sstream>
#include <string>
namespace loader {
static const char *knownDriverNames[] = {
MAKE_LIBRARY_NAME("ze_intel_gp... | Add Intel VPU driver to known driver list | Add Intel VPU driver to known driver list
Signed-off-by: Brandon Hong <83b2ef94d9cb629447eaa3169d13e819e85d72c7@intel.com>
| C++ | mit | oneapi-src/level-zero,oneapi-src/level-zero,oneapi-src/level-zero |
1c4f23766d78c248a1d033c645b07e61b1faa3f8 | src/Game.cpp | src/Game.cpp | #include "Game.hpp"
#include <Arduino.h>
namespace
{
constexpr uint32_t MsPerUpdate = 200;
} // namespace
namespace arduino_pong
{
void Game::run()
{
while(true)
{
uint32_t start = millis();
gameField_.update();
gameField_.render(renderer_);
int32_t delayValue = start + ... | #include "Game.hpp"
#include <Arduino.h>
namespace
{
constexpr uint32_t MsPerUpdate = 30;
} // namespace
namespace arduino_pong
{
void Game::run()
{
while(true)
{
uint32_t start = millis();
gameField_.update();
gameField_.render(renderer_);
int32_t delayValue = start + M... | Speed up the game a bit | Speed up the game a bit
delayValue was usually about 197. There is no need to wait that
long.
| C++ | mit | kurogit/arduino_pong |
027ffc8ffb4b631327c2bcf7a131823e16ebe023 | src/main.cpp | src/main.cpp | #include <logging/Logger.h>
#include <graphics/GlfwContext.h>
#include <graphics/GlfwWindow.h>
#include <graphics/Renderer.h>
#include <gamemodel/GameState.h>
#include <input/Input.h>
int main(int argc, char ** argv) {
Logger::initSystem(argc, argv);
GlfwContext glfwContext(Logger::glfwErrorCallback);
... | #include <memory>
#include <logging/Logger.h>
#include <graphics/GlfwContext.h>
#include <graphics/GlfwWindow.h>
#include <graphics/Renderer.h>
#include <gamemodel/GameState.h>
#include <input/Input.h>
int main(int argc, char ** argv) {
Logger::initSystem(argc, argv);
GlfwContext glfwContext(Logger::glfwEr... | Move some resources to heap | Move some resources to heap
| C++ | mit | GiGurra/drunken_walker,GiGurra/drunken_walker,GiGurra/drunken_walker,GiGurra/drunken_walker,GiGurra/drunken_walker |
78be5575e2af7b3ae7aefa44354588c688d2879b | src/lib/geodata/writers/kml/KmlTagWriter.cpp | src/lib/geodata/writers/kml/KmlTagWriter.cpp | //
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2009 Andrew Manson <g.real.ate@gmail.com>
//
#include "KmlTagWriter.h"
#include "... | //
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2009 Andrew Manson <g.real.ate@gmail.com>
//
#include "KmlTagWriter.h"
#include "... | Write namespaces using the respective methods, not via attributes. | Write namespaces using the respective methods, not via attributes.
Sanitizes gx: tags which don't end up in n* namespaces then
| C++ | lgpl-2.1 | Earthwings/marble,tzapzoor/marble,tzapzoor/marble,oberluz/marble,adraghici/marble,quannt24/marble,adraghici/marble,tucnak/marble,utkuaydin/marble,rku/marble,oberluz/marble,David-Gil/marble-dev,David-Gil/marble-dev,rku/marble,probonopd/marble,tucnak/marble,David-Gil/marble-dev,tucnak/marble,AndreiDuma/marble,adraghici/m... |
7635957f7207b6b4824a2c3ab8c0cfa9f5b64f65 | net/base/network_change_notifier_helper.cc | net/base/network_change_notifier_helper.cc | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/base/network_change_notifier_helper.h"
#include <algorithm>
#include "base/logging.h"
namespace net {
namespace internal {
NetworkCha... | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/base/network_change_notifier_helper.h"
#include <algorithm>
#include "base/logging.h"
namespace net {
namespace internal {
NetworkCha... | Disable DCHECK'ing that all NetworkChangeNotifiers are removed. BUG=34391 | Disable DCHECK'ing that all NetworkChangeNotifiers are removed.
BUG=34391
Review URL: http://codereview.chromium.org/560026
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@37982 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,Chilledheart/chromium,Jonekee/chromium.src,mogoweb... |
6d7ccd5b1b7c0b630565ba411bbe140afa187caf | FormulaEngine/EntryPoint.cpp | FormulaEngine/EntryPoint.cpp | //
// FormulaEngine Project
// By Mike Lewis - 2015
//
// Project entry point routine
//
#include "Pch.h"
#include "Tests.h"
#include "Simulation.h"
// This is Microsoft-specific for _TCHAR and _tmain.
// The entry point can be trivially rewritten for other
// compilers/platforms, so I'm not puttin... | //
// FormulaEngine Project
// By Mike Lewis - 2015
//
// Project entry point routine
//
#include "Pch.h"
#include "Tests.h"
#include "Simulation.h"
// This is Microsoft-specific for _TCHAR and _tmain.
// The entry point can be trivially rewritten for other
// compilers/platforms, so I'm not puttin... | Add stubbed out code for leak checking on MSVC | Add stubbed out code for leak checking on MSVC
| C++ | bsd-3-clause | apoch/formula-engine,apoch/formula-engine,apoch/formula-engine |
a8dbc9b1ea0560bcad050c21acb585d5e2a44a72 | packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/main.cpp | packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/main.cpp | //===-- main.cpp ------------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===-- main.cpp ------------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Fix a test that never compiled under -fmodules | [test] Fix a test that never compiled under -fmodules
This test #include's stdio.h, which, on at least two bots results in a
module import of MacTypes.h (due to weird SDK layering issues), which
causes the test to fail to compile.
Just don't #include stdio.h, as it's not needed for the test.
git-svn-id: 4c4cc70b1ef4... | C++ | apache-2.0 | llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb |
a7056dbb6502158458cdda671009754756dcb517 | test/std/re/re.regex/re.regex.construct/bad_range.pass.cpp | test/std/re/re.regex/re.regex.construct/bad_range.pass.cpp | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | Fix test that used raw string literals. Doesn't work in C++03 | Fix test that used raw string literals. Doesn't work in C++03
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@361894 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
a5e8eeb5ad814b06cc1122915520aa4a897c44c9 | simulator/infra/elf_parser/t/unit_test.cpp | simulator/infra/elf_parser/t/unit_test.cpp | // generic C
#include <cassert>
#include <cstdlib>
// Google Test library
#include <gtest/gtest.h>
// uArchSim modules
#include "../elf_parser.h"
static const char * valid_elf_file = "./mips_bin_exmpl.out";
//static const char * valid_section_name = ".data";
//
// Check that all incorect input params of the constru... | // generic C
#include <cassert>
#include <cstdlib>
// Google Test library
#include <gtest/gtest.h>
// uArchSim modules
#include "../elf_parser.h"
static const char * valid_elf_file = "./mips_bin_exmpl.out";
//static const char * valid_section_name = ".data";
//
// Check that all incorect input params of the constru... | Enable wrong_file_name test for ElfParser | Enable wrong_file_name test for ElfParser | C++ | mit | MIPT-ILab/mipt-mips,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips-2015,MIPT-ILab/mipt-mips-2015,gkorepanov/mipt-mips |
9d402b3dc637ff44fa8a2a2e720486a2df9c5ec1 | styx-client/styx-client/MirandaContact.cpp | styx-client/styx-client/MirandaContact.cpp | #include "MirandaContact.h"
#include <exception>
#include <sstream>
#include <m_contacts.h>
#include <m_core.h>
std::wstring MirandaContact::GetUID(HANDLE contactHandle)
{
auto contactInfo = CONTACTINFO();
contactInfo.hContact = contactHandle;
contactInfo.dwFlag = CNF_UNIQUEID | CNF_UNICODE;
if (CallService(MS_... | #include "MirandaContact.h"
#include <exception>
#include <sstream>
#include <m_contacts.h>
#include <m_core.h>
std::wstring MirandaContact::GetUID(HANDLE contactHandle)
{
auto contactInfo = CONTACTINFO();
contactInfo.hContact = contactHandle;
contactInfo.dwFlag = CNF_UNIQUEID | CNF_UNICODE;
if (CallService(MS_... | Fix bug with string user identifiers. | Fix bug with string user identifiers.
| C++ | mit | ForNeVeR/styx-miranda,ForNeVeR/styx-miranda,ForNeVeR/styx-miranda,ForNeVeR/styx-miranda,ForNeVeR/styx-miranda |
f4acf6257e48f927df33fadcb7f38c3d67709f40 | compiler/symtab/findCollidingNames.cpp | compiler/symtab/findCollidingNames.cpp | #include "findCollidingNames.h"
#include "symtab.h"
#include "stringutil.h"
/* Goal:
* Find symbols that have names which already exist and munge those.
* Strategy:
* Keep track of all function symbols, type symbols and variable symbols in vector structures.
* Search those structures for colliding names and change... | #include "findCollidingNames.h"
#include "symtab.h"
#include "stringutil.h"
/* Goal:
* Find symbols that have names which already exist and munge those.
* Strategy:
* Keep track of all function symbols, type symbols and variable symbols in vector structures.
* Search those structures for colliding names and change... | Patch broken build. To be reviewed by the author. | Patch broken build. To be reviewed by the author.
git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@3661 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
| C++ | apache-2.0 | hildeth/chapel,chizarlicious/chapel,hildeth/chapel,sungeunchoi/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,chizarlicious/chapel,hildeth/chapel,sungeunchoi/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,hildeth/chapel,chizarlicious/chapel,chizarlicious/chapel,CoryMcCartan/chapel,CoryMcCartan/chapel,chizarlicious/chapel... |
bce60a1a0cb7520a7cee087eba46ad5a72364387 | src/buffers.cpp | src/buffers.cpp | #include "buffers.h"
#include "strutil.h"
#include "log.h"
void processQueue(ByteQueue* queue, bool (*callback)(uint8_t*)) {
uint8_t snapshot[QUEUE_MAX_LENGTH(uint8_t)];
queue_snapshot(queue, snapshot);
if(callback == NULL) {
debug("Callback is NULL (%p) -- unable to handle queue at %p\r\n",
... | #include "buffers.h"
#include "strutil.h"
#include "log.h"
void processQueue(ByteQueue* queue, bool (*callback)(uint8_t*)) {
uint8_t snapshot[queue_length(queue)];
queue_snapshot(queue, snapshot);
if(callback == NULL) {
debug("Callback is NULL (%p) -- unable to handle queue at %p\r\n",
... | Make snapshot buffer shorter so we don't touch uninitialized memory. | Make snapshot buffer shorter so we don't touch uninitialized memory.
| C++ | bsd-3-clause | mgiannikouris/vi-firmware,openxc/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware,mgiannikouris/vi-firmware,ene-ilies/vi-firmware,ene-ilies/vi-firmware,ene-ilies/vi-firmware,mgiannikouris/vi-firmware,openxc/vi-firmware,mgiannikouris/vi-firmware,openxc/vi-firmware |
c56716c99bb52c17124b161d09bc394f1aca4808 | ex/fib.tas.cpp | ex/fib.tas.cpp | // Conventions:
// O is the stack pointer (post-decrement)
// B is the (so far only) return register
// C is the (so far only) argument register
// N is the relative-jump temp register
#ifndef ARGUMENT
#define ARGUMENT 10
#endif
#include "common.th"
_start:
prologue // sets up base/stack pointer
... | // Conventions:
// O is the stack pointer (post-decrement)
// B is the (so far only) return register
// C is the (so far only) argument register
// N is the relative-jump temp register
#ifndef ARGUMENT
#define ARGUMENT 10
#endif
#include "common.th"
_start:
prologue // sets up base/stack pointer
... | Simplify fib by one instruction | Simplify fib by one instruction
| C++ | mit | kulp/tenyr,kulp/tenyr,kulp/tenyr |
91cb3c737738cbdda8f6c46d9034694da1d55189 | src/main.cc | src/main.cc | #include <QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
app.setAttribute(Qt::AA_UseHighDpiPixmaps);
QIcon appIcon;
appIcon.addFile(":/Icons/AppIcon32");
appIcon.addFile(":/Icons/AppIcon128");
app.setWindowIcon(appIcon);
MainWindow ... | #include <QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
// Retina display support for Mac OS, iOS and X11:
// http://blog.qt.digia.com/blog/2013/04/25/retina-display-support-for-mac-os-ios-and-x11/
//
// AA_UseHighDpiPixmaps attribute is off... | Add comment about Retina display support | Add comment about Retina display support
| C++ | unlicense | jendas1/mini-cmake-qt,najlepsiwebdesigner/mini-cmake-qt,euler0/mini-cmake-qt,najlepsiwebdesigner/scidb |
7cd4ddc3383b04d68d0e00bc9115ba266733f81e | packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp | packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp | //===-- main.cpp ------------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===-- main.cpp ------------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Fix breakpoint_set_restart test for Windows | Fix breakpoint_set_restart test for Windows
When run with the multiprocess test runner, the getchar() trick doesn't work, so ninja check-lldb would fail on this test, but running the test directly worked fine.
Differential Revision: http://reviews.llvm.org/D19035
git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@... | C++ | apache-2.0 | apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb |
fea726c326aef0998f8d7fdede6b086445be065b | src/logging.cc | src/logging.cc | #include "logging.h"
#include <boost/log/utility/setup/console.hpp>
namespace logging = boost::log;
using boost::log::trivial::severity_level;
severity_level gLoggingThreshold;
long get_curlopt_verbose() { return gLoggingThreshold <= boost::log::trivial::debug ? 1L : 0L; }
void logger_init() {
gLoggingThreshold ... | #include "logging.h"
#include <boost/log/utility/setup/console.hpp>
namespace logging = boost::log;
using boost::log::trivial::severity_level;
severity_level gLoggingThreshold;
long get_curlopt_verbose() { return gLoggingThreshold <= boost::log::trivial::debug ? 1L : 0L; }
void logger_init() {
gLoggingThreshold ... | Add a better fix to flush the log messages | Add a better fix to flush the log messages
Change-Id: Iead2cee7ae2e2d184a147c0f3b0497759efc7025
| C++ | mpl-2.0 | advancedtelematic/aktualizr,advancedtelematic/aktualizr,advancedtelematic/sota_client_cpp,advancedtelematic/aktualizr,advancedtelematic/aktualizr,advancedtelematic/sota_client_cpp |
c84ac8132d85b7262cba138a4a54e3180334bea6 | src/tools/tools/src/assets/importers/spritesheet_importer.cpp | src/tools/tools/src/assets/importers/spritesheet_importer.cpp | #include "spritesheet_importer.h"
#include "halley/core/graphics/sprite/sprite_sheet.h"
#include "halley/tools/file/filesystem.h"
#include "halley/bytes/byte_serializer.h"
#include "halley/file_formats/yaml_convert.h"
using namespace Halley;
void SpriteSheetImporter::import(const ImportingAsset& asset, IAssetCollecto... | #include "spritesheet_importer.h"
#include "halley/core/graphics/sprite/sprite_sheet.h"
#include "halley/tools/file/filesystem.h"
#include "halley/bytes/byte_serializer.h"
#include "halley/file_formats/yaml_convert.h"
using namespace Halley;
void SpriteSheetImporter::import(const ImportingAsset& asset, IAssetCollecto... | Fix name of generated SpriteSheet assets and enable compression for them | Fix name of generated SpriteSheet assets and enable compression for them
| C++ | apache-2.0 | amzeratul/halley,amzeratul/halley,amzeratul/halley |
072af9aaed519635c4b3a5a58903c554066fb2b3 | src/Mapper0.cpp | src/Mapper0.cpp | #include <cstdint>
#include <Mapper0.h>
uint8_t Mapper0::readPrg(uint16_t addr) {
int index = addr % cartMemory.prg.size();
return cartMemory.prg[index];
}
uint8_t Mapper0::readChr(uint16_t addr) {
int index = addr % cartMemory.chr.size();
return cartMemory.chr[index];
}
void Mapper0::writeChr(uint1... | #include <cstdint>
#include <Mapper0.h>
uint8_t Mapper0::readPrg(uint16_t addr) {
if (addr >= 0x8000) {
int index = addr % cartMemory.prg.size();
return cartMemory.prg[index];
}
else if (addr >= 0x6000) {
int index = addr % 0x2000;
return cartMemory.ram[index];
}
else {
return 0;
}
}
uin... | Fix mapper0 readPrg ignoring ram | Fix mapper0 readPrg ignoring ram
| C++ | mit | scottjcrouch/ScootNES,scottjcrouch/ScootNES,scottjcrouch/ScootNES |
f588eb5a782e3698df7574cf22828b4864dd6e7c | ExampleState.cpp | ExampleState.cpp | #include "stdafx.h"
#include "ExampleState.h"
ExampleState::ExampleState() {
// Create an example object to display on screen
std::unique_ptr<ExampleObject> player(new ExampleObject());
object_manager_.Add(std::move(player));
// SFML will play audio in a seperate thread so we dont have to worry about that
/... | #include "stdafx.h"
#include "ExampleState.h"
ExampleState::ExampleState() {
// Create an example object to display on screen
std::unique_ptr<ExampleObject> player(new ExampleObject());
object_manager_.Add(std::move(player));
// SFML will play audio in a seperate thread so we dont have to worry about that
/... | Update use of audio cache function after rename | Update use of audio cache function after rename
| C++ | mit | Astonex/GameFramework,Astonex/GameFramework |
0e3f2a7f9f3283d022c1889fae0ad0316147e081 | item.cpp | item.cpp | #ifdef __WAND__
target[name[item.o] type[object]]
#endif
#include "item.h"
#include "macro.h"
#include "commentprocessor.h"
#include <herbs/intformat/intformat.h>
#include <herbs/exceptionmissing/exceptionmissing.h>
Herbs::String Doxymax::Item::expand(const Macro& macro,CommentProcessor& processor)
{
if(macro.args... | #ifdef __WAND__
target[name[item.o] type[object]]
#endif
#include "item.h"
#include "macro.h"
#include "commentprocessor.h"
#include <herbs/intformat/intformat.h>
#include <herbs/exceptionmissing/exceptionmissing.h>
Herbs::String Doxymax::Item::expand(const Macro& macro,CommentProcessor& processor)
{
if(macro.args... | Use div instead of span to gain flexibility | 'Doxymax::Item': Use div instead of span to gain flexibility
| C++ | bsd-2-clause | milasudril/doxymax,milasudril/doxymax |
24ca2976395bec0f57c0c182d443089affac68d6 | src/sender.cpp | src/sender.cpp | #include "paxos/logging.hpp"
#include "paxos/sender.hpp"
#include <boost/asio/io_service.hpp>
using boost::asio::ip::tcp;
BoostTransport::BoostTransport()
: io_service_(),
socket_(io_service_)
{
}
BoostTransport::~BoostTransport()
{
socket_.close();
}
void
BoostTransport::Connect(std::string host... | #include "paxos/logging.hpp"
#include "paxos/sender.hpp"
#include <boost/asio/io_service.hpp>
using boost::asio::ip::tcp;
BoostTransport::BoostTransport()
: io_service_(),
socket_(io_service_)
{
}
BoostTransport::~BoostTransport()
{
socket_.close();
}
void
BoostTransport::Connect(std::string host... | Add try-block handling failed connections | Add try-block handling failed connections
| C++ | mit | dgkimura/paxos |
c30a012b91b36697af77d9ae6719c5d28ec01c21 | Settings/Tab.cpp | Settings/Tab.cpp | #include "Tab.h"
#include "UIContext.h"
Tab::Tab() {
}
Tab::~Tab() {
delete _ctxt;
}
DLGPROC Tab::TabProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) {
unsigned short nCode, ctrlId;
switch (message) {
case WM_INITDIALOG:
_hWnd = hDlg;
_ctxt = new UIContext(hDlg);
... | #include "Tab.h"
#include "UIContext.h"
Tab::Tab() {
}
Tab::~Tab() {
delete _ctxt;
}
DLGPROC Tab::TabProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) {
unsigned short nCode, ctrlId;
switch (message) {
case WM_INITDIALOG:
_hWnd = hDlg;
_ctxt = new UIContext(hDlg);
... | Call initialize method during WM_INITDIALOG | Call initialize method during WM_INITDIALOG
| C++ | bsd-2-clause | malensek/3RVX,Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX |
e6b8536bcb15060f3d6ac054d122c8c951e36c57 | tests/main.cpp | tests/main.cpp | //
// Copyright © 2016 D.E. Goodman-Wilson. All rights reserved.
//
#include <gtest/gtest.h>
#include <slack/slack.h>
#include <cpr/cpr.h>
#include "environment.h"
::Environment* env;
int main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);
env = dynamic_cast<::Environment*>(::testing::AddG... | //
// Copyright © 2016 D.E. Goodman-Wilson. All rights reserved.
//
#include <gtest/gtest.h>
#include <slack/slack.h>
#include <cpr/cpr.h>
#include "environment.h"
::Environment* env;
int main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);
if(!std::getenv("SLACK_TOKEN"))
{
std:... | Make the test not crash. | Make the test not crash.
| C++ | mit | DEGoodmanWilson/engine,DEGoodmanWilson/engine,DEGoodmanWilson/engine |
8e5b3c9a126bb4190c917732161d4fcef39ef538 | src/wallet/test/wallet_test_fixture.cpp | src/wallet/test/wallet_test_fixture.cpp | // Copyright (c) 2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "wallet/test/wallet_test_fixture.h"
#include "rpc/server.h"
#include "wallet/db.h"
#include "wallet/wallet.h"
WalletTes... | // Copyright (c) 2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "wallet/test/wallet_test_fixture.h"
#include "rpc/server.h"
#include "wallet/db.h"
#include "wallet/wallet.h"
WalletTes... | Fix multiple data allocate for CWallet | Fix multiple data allocate for CWallet
| C++ | mit | zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin |
92c0fdd6eeeb2d42a0aef3f2aa0250f71f53df18 | src/demos/vehicle/m113/M113_SimplePowertrain.cpp | src/demos/vehicle/m113/M113_SimplePowertrain.cpp | // =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of th... | // =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of th... | Adjust M113 simple powertrain parameters. | Adjust M113 simple powertrain parameters.
- Max. engine speed must be specified in rad/s
- Decrease gear ratio (to include the effect of the unmodeled transmission)
| C++ | bsd-3-clause | armanpazouki/chrono,Milad-Rakhsha/chrono,dariomangoni/chrono,dariomangoni/chrono,rserban/chrono,projectchrono/chrono,rserban/chrono,tjolsen/chrono,rserban/chrono,andrewseidl/chrono,jcmadsen/chrono,Milad-Rakhsha/chrono,tjolsen/chrono,armanpazouki/chrono,amelmquist/chrono,tjolsen/chrono,jcmadsen/chrono,dariomangoni/chron... |
706254ae4691a51f978014c6d39d6bb44e29c0b9 | thinglang/runtime/main.cpp | thinglang/runtime/main.cpp | #include <iostream>
#include <vector>
#include <fstream>
#include "../include/args.h"
#include "errors/RuntimeError.h"
#include "execution/Program.h"
#include "loader/ProgramReader.h"
int main(int argc, char **argv)
{
args::ArgumentParser parser("thinglang's runtime environment");
args::HelpFlag help(parser,... | #include <iostream>
#include <vector>
#include <fstream>
#include "../include/args.h"
#include "errors/RuntimeError.h"
#include "execution/Program.h"
#include "loader/ProgramReader.h"
int main(const int argc, const char **argv)
{
args::ArgumentParser parser("thinglang's runtime environment");
args::HelpFlag... | Fix const qualifer, since that's the most critical thing according to CLion | Fix const qualifer, since that's the most critical thing according to CLion
| C++ | mit | ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang |
39c619334108c73d7a16d6e4e43c8ebc2c97a945 | ASM76/ASM76.cpp | ASM76/ASM76.cpp | //=============================================================================
// ■ ASM76/ASM76.cpp
//-----------------------------------------------------------------------------
// 全局变量与实用函数。
//=============================================================================
#include "ASM76.hpp"
namespace ASM76 {
/... | //=============================================================================
// ■ ASM76/ASM76.cpp
//-----------------------------------------------------------------------------
// 全局变量与实用函数。
//=============================================================================
#include "ASM76.hpp"
namespace ASM76 {
/... | Optimize printf -> puts — just one useless step | Optimize printf -> puts — just one useless step
| C++ | agpl-3.0 | IcebergOS/VM-76 |
b3b16bd1d09f42cbbd1b0175669135f156326bdf | tests/CheatSheetTest.cpp | tests/CheatSheetTest.cpp |
static void (*real_one) ();
static void stub(){}
/* in CheatSheetTest.cpp */
#include "CppUTest/TestHarness.h"
/* Declare TestGroup with name CheatSheet */
TEST_GROUP(CheatSheet)
{
/* declare a setup method for the test group. Optional. */
void setup ()
{
/* Set method real_one to stub. Automatically restore... |
static void (*real_one) ();
static void stub(){}
/* in CheatSheetTest.cpp */
#include "CppUTest/TestHarness.h"
/* Declare TestGroup with name CheatSheet */
TEST_GROUP(CheatSheet)
{
/* declare a setup method for the test group. Optional. */
void setup ()
{
/* Set method real_one to stub. Automatically restore... | Remove intentional failure again, so build can pass | Remove intentional failure again, so build can pass
| C++ | bsd-3-clause | basvodde/cpputest,jaeguly/cpputest,Andne/cpputest,PaulBussmann/cpputest,Mindtribe/cpputest,Andne/cpputest,jaeguly/cpputest,KisImre/cpputest,KisImre/cpputest,asgeroverby/cpputest,chenlianbing/cpputest,basvodde/cpputest,cpputest/cpputest,devMichaelJones/cpputest,arstrube/cpputest,jaeguly/cpputest,arstrube/cpputest,basvod... |
b04783268ea5269414bab570cf3da4fb2f33c3e2 | Image.cpp | Image.cpp | #include "Image.h"
namespace hm
{
Image::Image()
{
}
Image::Image(std::string filename, SDL_Renderer* renderer)
{
loadImage(filename, renderer);
}
void Image::loadImage(std::string filename, SDL_Renderer* renderer)
{
// Unload a previous image.
if(texture != nullptr)
{
SDL_DestroyTexture(textur... | #include "Image.h"
namespace hm
{
Image::Image()
{
}
Image::Image(std::string filename, SDL_Renderer* renderer)
{
loadImage(filename, renderer);
}
void Image::loadImage(std::string filename, SDL_Renderer* renderer)
{
// Unload a previous image.
if(texture != nullptr)
{
SDL_DestroyTexture(textur... | Make it more obvious that a file name should follow. | Make it more obvious that a file name should follow.
| C++ | lgpl-2.1 | mdclyburn/hume |
51a403286e5c80636431f342bec502ab732dc338 | chrome/browser/extensions/extension_webnavigation_apitest.cc | chrome/browser/extensions/extension_webnavigation_apitest.cc | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
IN_PROC_BROWSER_T... | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
IN_PROC_BROWSER_T... | Disable ExtensionApiTest.WebNavigationEvents1, flakily exceeds test timeout | Disable ExtensionApiTest.WebNavigationEvents1, flakily exceeds test timeout
TBR=jochen
BUG=72165
TEST=browser_tests
Review URL: http://codereview.chromium.org/6286142
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@73975 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | adobe/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,yitian134/chr... |
a536e9843af07531b4c8aba50f4de92693f790b5 | modules/tweek/test/CxxClient/StringObserverImpl.cpp | modules/tweek/test/CxxClient/StringObserverImpl.cpp | #include <iostream>
#include <StringObserverImpl.h>
void StringObserverImpl::update()
{
char* cur_value = mSubject->getValue();
std::cout << "Current string value is now '" << cur_value << "'\n";
delete cur_value;
}
| #include <vpr/Util/Debug.h>
#include <StringObserverImpl.h>
void StringObserverImpl::update()
{
char* cur_value = mSubject->getValue();
vprDEBUG(vprDBG_ALL, vprDBG_CRITICAL_LVL)
<< "Current string value is now '" << cur_value << "'\n"
<< vprDEBUG_FLUSH;
delete cur_value;
}
| Use vprDEBUG instead of std::cout to print the current string value. | Use vprDEBUG instead of std::cout to print the current string value.
git-svn-id: 769d22dfa2d22aad706b9a451492fb87c0735f19@11032 08b38cba-cd3b-11de-854e-f91c5b6e4272
| C++ | lgpl-2.1 | godbyk/vrjuggler-upstream-old,MichaelMcDonnell/vrjuggler,MichaelMcDonnell/vrjuggler,MichaelMcDonnell/vrjuggler,LiuKeHua/vrjuggler,MichaelMcDonnell/vrjuggler,godbyk/vrjuggler-upstream-old,vrjuggler/vrjuggler,vancegroup-mirrors/vrjuggler,MichaelMcDonnell/vrjuggler,godbyk/vrjuggler-upstream-old,LiuKeHua/vrjuggler,MichaelM... |
036e81c79805364d984af2be06be62562e08c980 | test/CXX/special/class.copy/p15-0x.cpp | test/CXX/special/class.copy/p15-0x.cpp | // RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s
namespace PR10622 {
struct foo {
const int first;
foo(const foo&) = default;
};
void find_or_insert(const foo& __obj) {
foo x(__obj);
}
}
| // RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s
namespace PR10622 {
struct foo {
const int first;
foo(const foo&) = default;
};
void find_or_insert(const foo& __obj) {
foo x(__obj);
}
struct bar : foo {
bar(const bar&) = default;
};
void test_bar(const bar &obj) {
bar obj2(obj... | Expand test of C++0x [class.copymove]p15 to make sure we're actually calling the copy constructor of a base/member from an explicitly-defaulted copy constructor, rather than the default constructor | Expand test of C++0x [class.copymove]p15 to make sure we're actually calling the copy constructor of a base/member from an explicitly-defaulted copy constructor, rather than the default constructor
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@137220 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl... |
4f2258154251645d694823aed71827586a4c3a3e | framework/extensions.cpp | framework/extensions.cpp | #include "extensions.h"
#include "extensions/accelerometer.h"
#include "extensions/debugconsole.h"
#include "extensions/deviceinfo.h"
#include "extensions/hash.h"
#include "extensions/notification.h"
#ifdef Q_WS_S60
#include "extensions/camera.h"
#include "extensions/memorywatcher.h"
#endif
#include <QWebFrame>
Ext... | #include "extensions.h"
#include "extensions/accelerometer.h"
#include "extensions/debugconsole.h"
#include "extensions/deviceinfo.h"
#include "extensions/geolocation.h"
#include "extensions/hash.h"
#include "extensions/notification.h"
#ifdef Q_WS_S60
#include "extensions/camera.h"
#include "extensions/memorywatcher.h... | Add Geolocation to exported APIs. | Add Geolocation to exported APIs.
| C++ | apache-2.0 | apache/cordova-qt,dkormalev/incubator-cordova-qt,apache/cordova-qt,tranter/cordova-qt,apache/cordova-qt,dkormalev/incubator-cordova-qt,tranter/cordova-qt |
ff65d84e8d76d62e07984301d3d0b3ae548d5613 | src/Bot.cpp | src/Bot.cpp | #include "tgbot/Bot.h"
#include "tgbot/EventBroadcaster.h"
#if __cplusplus < 201402L
namespace std {
template<class T> struct _Unique_if {
typedef unique_ptr<T> _Single_object;
};
template<class T> struct _Unique_if<T[]> {
typedef unique_ptr<T[]> _Unknown_bound;
};
template<clas... | #include "tgbot/Bot.h"
#include "tgbot/EventBroadcaster.h"
#if __cplusplus == 201103L
namespace std {
template<typename T>
inline std::unique_ptr<T> make_unique() {
return std::unique_ptr<T>(new T());
}
}
#endif
namespace TgBot {
Bot::Bot(std::string token, const HttpClient& httpClient)
: _t... | Fix build error in versions below MSVC 12.0 | Fix build error in versions below MSVC 12.0
| C++ | mit | JellyBrick/tgbot-cpp,JellyBrick/tgbot-cpp,JellyBrick/tgbot-cpp |
c1869e85de60c09359250f67474dd03eddc64a3e | tools/bugpoint/bugpoint.cpp | tools/bugpoint/bugpoint.cpp | //===- bugpoint.cpp - The LLVM BugPoint utility ---------------------------===//
//
// This program is an automated compiler debugger tool. It is used to narrow
// down miscompilations and crash problems to a specific pass in the compiler,
// and the specific Module or Function input that is causing the problem.
//
//... | //===- bugpoint.cpp - The LLVM BugPoint utility ---------------------------===//
//
// This program is an automated compiler debugger tool. It is used to narrow
// down miscompilations and crash problems to a specific pass in the compiler,
// and the specific Module or Function input that is causing the problem.
//
//... | Add variable to capture arguments that should be passed to the user program This is unused so far. | Add variable to capture arguments that should be passed to the user program
This is unused so far.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@7422 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/... |
7e05a832ff3bc58685cebae0c9ecb5cc715ebed1 | test/asan/TestCases/Windows/dll_intercept_memchr.cc | test/asan/TestCases/Windows/dll_intercept_memchr.cc | // RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
#include <string.h>
extern "C" __declspec(dllexport)
int test_function() {
char buff[6] = "Hello";
memchr(buff, 'z', 7);
// CHECK: AddressSanitizer: stack-buffer-overflow on ... | // RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
// On windows 64-bit, the memchr function is written in assembly and is not
// hookable with the interception library. There is not enough padding before
// the function and there ... | Disable a broken test on windows 64-bits | [compiler-rt][asan] Disable a broken test on windows 64-bits
Summary:
This test is broken on wndows 64-bit.
The interception library is not able to hook on the memchr functions.
Snippet of the function that is not hookable:
```
--- No source file -------------------------------------------------------------
000007FE... | C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
f116f028691dfa196c0a4b75bf385cfe61a26e27 | excercise03/02.cpp | excercise03/02.cpp | #include <stdio.h>
#include <stdlib.h>
int *list;
int size;
int sum;
int main(void)
{
size = 9;
sum = 15;
list = (int *)malloc(sizeof(int) * size);
list[0] = 1;
list[1] = 5;
list[2] = 8;
list[3] = 3;
list[4] = 7;
list[5] = 12;
list[6] = 11;
list[7] = 2;
list[8] = 6;
... | #include <stdio.h>
#include <stdlib.h>
void trim_out_of_range(void);
int shift_right(const int idx, const int sum = 0);
int shift_down(const int idx, const int sum = 0);
int *list;
int size;
int sum;
int main(void)
{
printf("Enter n= "); scanf("%d", &size);
list = (int *)malloc(sizeof(int) * size);
for(... | Add solution of prob 2 | Add solution of prob 2
| C++ | mit | kdzlvaids/algorithm_and_practice-pknu-2016,kdzlvaids/algorithm_and_practice-pknu-2016 |
f5b021fb88db053c08faff4540bc97434a2ed35f | src/Genes/Stacked_Pawns_Gene.cpp | src/Genes/Stacked_Pawns_Gene.cpp | #include "Genes/Stacked_Pawns_Gene.h"
#include <memory>
#include <string>
#include "Game/Board.h"
#include "Game/Piece.h"
#include "Game/Color.h"
#include "Genes/Gene.h"
double Stacked_Pawns_Gene::score_board(const Board& board, Color perspective, size_t) const
{
double score = 0.0;
auto own_pawn = board.p... | #include "Genes/Stacked_Pawns_Gene.h"
#include <memory>
#include <string>
#include "Game/Board.h"
#include "Game/Piece.h"
#include "Game/Color.h"
#include "Genes/Gene.h"
double Stacked_Pawns_Gene::score_board(const Board& board, Color perspective, size_t) const
{
double score = 0.0;
auto own_pawn = board.p... | Reduce search space when looking for pawns | Reduce search space when looking for pawns
| C++ | mit | MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess |
5ac403463061ff34233f4e0a8294cb1356f2e028 | Sub-Terra/src/Integrator.cpp | Sub-Terra/src/Integrator.cpp | #include "common.h"
#include "Integrator.h"
#include "IntegrableProperty.h"
#include "EventManager.h"
void Integrator::Update(DeltaTicks &dt) {
accumulator += dt;
if(accumulator.Seconds() > 1.0f) { accumulator.SetSeconds(1.0f); }
alphaMicroseconds = static_cast<uint32_t>(accumulator.Seconds() * 1000000.0f);
while... | #include "common.h"
#include "Integrator.h"
#include "IntegrableProperty.h"
#include "EventManager.h"
void Integrator::Update(DeltaTicks &dt) {
accumulator += dt;
if(accumulator.Seconds() > 1.0f) { accumulator.SetSeconds(1.0f); }
while(accumulator >= timestep) {
Tick(timestep.Seconds());
accumulator -= timeste... | Set integrator microseconds value at end of tick | Set integrator microseconds value at end of tick
| C++ | mpl-2.0 | shockkolate/polar4,polar-engine/polar,polar-engine/polar,shockkolate/polar4,shockkolate/polar4,shockkolate/polar4 |
bfc877fae0b745a1f11a1890fe2a794aefc5c3de | http.cpp | http.cpp | //
// Copyright © 2015 Slack Technologies, Inc. All rights reserved.
//
#include "slack/http.h"
namespace slack
{
namespace http
{
std::function<response(std::string url, params)> get;
std::function<response(std::string url, params)> post;
} //namespace http
} //namespace slack
| //
// Copyright © 2015 Slack Technologies, Inc. All rights reserved.
//
#include "slack/http.h"
#include <cpr.h>
namespace slack
{
namespace http
{
std::function<response(std::string url, params)> get = [](std::string url, slack::http::params params) -> slack::http::response {
cpr::Parameters p;
for (auto &k... | Use CPR by default now. | Use CPR by default now.
| C++ | mit | DEGoodmanWilson/engine,DEGoodmanWilson/engine,DEGoodmanWilson/engine |
30d596f793bb673fad5b7e2a9095ff3fb8a56484 | src/qt/test/test_main.cpp | src/qt/test/test_main.cpp | #include <QTest>
#include <QObject>
#include "uritests.h"
// This is all you need to run all the tests
int main(int argc, char *argv[])
{
URITests test1;
QTest::qExec(&test1);
}
| #include <QTest>
#include <QObject>
#include "uritests.h"
// This is all you need to run all the tests
int main(int argc, char *argv[])
{
bool fInvalid = false;
URITests test1;
if (QTest::qExec(&test1) != 0)
fInvalid = true;
return fInvalid;
}
| Return !0 when qt tests fail. | Return !0 when qt tests fail.
| C++ | mit | syscoin/syscoin,Infernoman/crowncoin,Crowndev/crowncoin,syscoin/syscoin,syscoin/syscoin,dobbscoin/dobbscoin-source,syscoin/syscoin,syscoin/syscoin,Infernoman/crowncoin,Crowndev/crowncoin,Earlz/dobbscoin-source,domob1812/crowncoin,Earlz/dobbscoin-source,domob1812/crowncoin,domob1812/crowncoin,dobbscoin/dobbscoin-source,... |
3283fc52f370fb8c99d0936e2bd8283d02ec0720 | test/CodeGenCXX/debug-info-namespace.cpp | test/CodeGenCXX/debug-info-namespace.cpp | // RUN: %clang -g -S -emit-llvm %s -o - | FileCheck %s
namespace A {
#line 1 "foo.cpp"
namespace B {
int i;
}
}
// CHECK: [[FILE:![0-9]*]]} ; [ DW_TAG_file_type ] [{{.*}}/test/CodeGenCXX/debug-info-namespace.cpp]
// CHECK: [[VAR:![0-9]*]] = {{.*}}, metadata [[NS:![0-9]*]], metadata !"i", {{.*}} ; [ DW_TAG_variable ]... | // RUN: %clang -g -S -emit-llvm %s -o - | FileCheck %s
namespace A {
#line 1 "foo.cpp"
namespace B {
int i;
}
}
// CHECK: [[FILE:![0-9]*]] {{.*}}debug-info-namespace.cpp"
// CHECK: [[VAR:![0-9]*]] = {{.*}}, metadata [[NS:![0-9]*]], metadata !"i", {{.*}} ; [ DW_TAG_variable ] [i]
// CHECK: [[NS]] = {{.*}}, metadata [... | Debug info - generalize namespace test to not depend on a DW_TAG_file_type entry | Debug info - generalize namespace test to not depend on a DW_TAG_file_type entry
This isn't necessary & with the next change to LLVM the DW_TAG_file_type entry
won't be emitted at all - only the raw filename/directory pair, so match on
that directly instead.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@177609... | C++ | apache-2.0 | apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl... |
627ce4d1d8ea19fa0a310de2b484ad9385f54982 | src/modules.cpp | src/modules.cpp | /*
* modules.cpp
* StatusSpec project
*
* Copyright (c) 2014 thesupremecommander
* BSD 2-Clause License
* http://opensource.org/licenses/BSD-2-Clause
*
*/
#pragma once
#include "stdafx.h"
#include "modules.h"
void ModuleManager::UnloadAllModules() {
for (auto iterator = modules.begin(); iterator != mo... | /*
* modules.cpp
* StatusSpec project
*
* Copyright (c) 2014 thesupremecommander
* BSD 2-Clause License
* http://opensource.org/licenses/BSD-2-Clause
*
*/
#pragma once
#include "stdafx.h"
#include "modules.h"
void ModuleManager::UnloadAllModules() {
for (auto iterator = modules.begin(); iterator != mo... | Add a message when unloading a module. | Add a message when unloading a module.
| C++ | bsd-2-clause | fwdcp/StatusSpec,fwdcp/StatusSpec |
19891b082be53204ec91da31aee902966508c6d8 | test/SemaCXX/inherit.cpp | test/SemaCXX/inherit.cpp | // RUN: clang -fsyntax-only -verify %s
class A { };
class B1 : A { };
class B2 : virtual A { };
class B3 : virtual virtual A { }; // expected-error{{duplicate 'virtual' in base specifier}}
class C : public B1, private B2 { };
class D;
class E : public D { }; // expected-error{{base class has incomplete type}}
t... | // RUN: clang -fsyntax-only -verify %s
class A { };
class B1 : A { };
class B2 : virtual A { };
class B3 : virtual virtual A { }; // expected-error{{duplicate 'virtual' in base specifier}}
class C : public B1, private B2 { };
class D; // expected-note {{forward declaration of 'class D'}}
class E : public D { };... | Add expected note. Surely people test before the check in stuff. | Add expected note. Surely people test before the check in stuff.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@64565 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl... |
934ba31118dc2008466034d2b23f89c0f0a0e016 | sw.cpp | sw.cpp | void build(Solution &s)
{
auto &tgbot = s.addTarget<StaticLibraryTarget>("reo7sp.tgbot", "1.2.0");
{
tgbot += Git("https://github.com/reo7sp/tgbot-cpp", "v{M}.{m}");
tgbot += cpp11;
tgbot.Public += "org.sw.demo.boost.property_tree"_dep;
tgbot.Public += "org.sw.demo.openssl.ssl"... | void build(Solution &s)
{
auto &tgbot = s.addTarget<StaticLibraryTarget>("reo7sp.tgbot", "1.2.0");
{
tgbot += Git("https://github.com/reo7sp/tgbot-cpp", "v{M}.{m}");
tgbot += cpp11;
tgbot.Public += "org.sw.demo.boost.property_tree"_dep;
tgbot.Public += "org.sw.demo.openssl.ssl"... | Add cpp11 for test also. | Add cpp11 for test also. | C++ | mit | JellyBrick/tgbot-cpp,reo7sp/tgbot-cpp,reo7sp/tgbot-cpp,JellyBrick/tgbot-cpp,reo7sp/tgbot-cpp,JellyBrick/tgbot-cpp |
dd4283b7c188c89189e9f167c9e8b5c95ed5f8f7 | Log.cpp | Log.cpp | #include "Log.h"
#include <boost/date_time/posix_time/posix_time.hpp>
Log * g_Log = nullptr;
static const char * g_LogLevelStr[eNumLogLevels] =
{
"error", // eLogError
"warn", // eLogWarning
"info", // eLogInfo
"debug" // eLogDebug
};
void LogMsg::Process()
{
output << boost::posix_time::second_clock::local... | #include "Log.h"
#include <boost/date_time/posix_time/posix_time.hpp>
Log * g_Log = nullptr;
static const char * g_LogLevelStr[eNumLogLevels] =
{
"error", // eLogError
"warn", // eLogWarning
"info", // eLogInfo
"debug" // eLogDebug
};
void LogMsg::Process()
{
output << boost::posix_time::second_clock::local... | Revert "fixed typo" and "fixed crash for Windows" | Revert "fixed typo" and "fixed crash for Windows"
This reverts commits c8a80a497d6b7f0f98841b72febb0dba9fabec28 and f7791e5289ef61860e0fca024f86c31e448982f1
This didn't actually fix Windows crash problem. In fact, it still
crashed without --log=0 being set. Changes to the i2pd.vcxproj file
fixed the crashes with VS 2... | C++ | bsd-3-clause | majestrate/kovri,01BTC10/i2pd,kytvi2p/i2pd,hypnosis-i2p/i2pd,hypnosis-i2p/i2pd,edwtjo/i2pd,EinMByte/i2pd,EinMByte/i2pd,EinMByte/i2pd,PurpleI2P/i2pd,majestrate/i2pd,mlt/i2pd,brain5lug/i2pd,mlt/i2pd,manasb/i2pd,edwtjo/i2pd,majestrate/i2pd,mlt/i2pd,PurpleI2P/i2pd,edwtjo/i2pd,mlt/i2pd,majestrate/kovri,brain5lug/i2pd,majest... |
9ee77a5481a88442061c1cbfa84b334015a17d95 | folly/python/executor.cpp | folly/python/executor.cpp | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appl... | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appl... | Remove dead includes in folly/python | Remove dead includes in folly/python
Reviewed By: pranavtbhat
Differential Revision: D34103812
fbshipit-source-id: e02b728d468bf091e8b4521f8f8746a986a2130d
| C++ | apache-2.0 | facebook/folly,facebook/folly,facebook/folly,facebook/folly,facebook/folly |
3bd1f452b5f0be8a62e6a1952fc3a604ffccfa60 | tests/test_version.cpp | tests/test_version.cpp | #include "../src/pugixml.hpp"
#if PUGIXML_VERSION != 1120
#error Unexpected pugixml version
#endif
| #include "../src/pugixml.hpp"
#if PUGIXML_VERSION != 1130
#error Unexpected pugixml version
#endif
| Fix version check in test | Fix version check in test
| C++ | mit | zeux/pugixml,zeux/pugixml,zeux/pugixml,zeux/pugixml |
6da312a2051db3d734b550760530fe6a6a27ed3f | src/tac/Utils.cpp | src/tac/Utils.cpp | //=======================================================================
// Copyright Baptiste Wicht 2011.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//=====================================================... | //=======================================================================
// Copyright Baptiste Wicht 2011.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//=====================================================... | Fix the safe functions calculations function to handle the new function names | Fix the safe functions calculations function to handle the new function names
| C++ | mit | vogelsgesang/eddic,wichtounet/eddic,vogelsgesang/eddic,wichtounet/eddic,wichtounet/eddic,vogelsgesang/eddic |
54c72fa6e1525913de70ec3bf8802ed833baa2ac | base/system_monitor_win.cc | base/system_monitor_win.cc | // Copyright (c) 2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/system_monitor.h"
namespace base {
void SystemMonitor::ProcessWmPowerBroadcastMessage(int event_id) {
PowerEvent power_eve... | // Copyright (c) 2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/system_monitor.h"
namespace base {
void SystemMonitor::ProcessWmPowerBroadcastMessage(int event_id) {
PowerEvent power_eve... | Update comments and remove bogus DCHECK in windows-specific broadcasted power message status. | Update comments and remove bogus DCHECK in windows-specific broadcasted power message status.
Review URL: http://codereview.chromium.org/16220
git-svn-id: http://src.chromium.org/svn/trunk/src@7398 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: 426ce67687a6f4396181ab45ffe6223098d4fd4e | C++ | bsd-3-clause | meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u... |
ec1bcc96cba3c7b2d9f450ad5e60fb168232cddb | launcher.cpp | launcher.cpp | #include <ShObjIdl.h>
#include <atlbase.h>
#include <wchar.h>
int wmain(int argc, wchar_t* argv[])
{
HRESULT hr = S_OK;
if (argc < 2)
{
hr = E_INVALIDARG;
wprintf(L"Supply an app ID (AppUserModelId) for the application to launch.");
return hr;
}
const wchar_t* appId = argv... | #include <ShObjIdl.h>
#include <wchar.h>
HRESULT CreateAAM(IApplicationActivationManager*& aam)
{
return CoCreateInstance(CLSID_ApplicationActivationManager, nullptr, CLSCTX_LOCAL_SERVER, IID_PPV_ARGS(&aam));
}
HRESULT ActivateApp(IApplicationActivationManager* aam, const wchar_t* appId)
{
unsigned long unuse... | Switch to nesting for less repetitive error handling. | Switch to nesting for less repetitive error handling.
Also extract some methods.
| C++ | mit | YuzuJS/WinningJS-activator |
9e0b7f76f95dd45c99e95076badba2c8f123c31a | src/gallium/state_trackers/clover/core/platform.cpp | src/gallium/state_trackers/clover/core/platform.cpp | //
// Copyright 2012 Francisco Jerez
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish... | //
// Copyright 2012 Francisco Jerez
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish... | Fix memory leak when initializing a device object fails. | clover: Fix memory leak when initializing a device object fails.
Tested-by: Tom Stellard <85590917cb30a670bf23f5b4273617f8815d1e87@amd.com>
| C++ | mit | zz85/glsl-optimizer,tokyovigilante/glsl-optimizer,wolf96/glsl-optimizer,mapbox/glsl-optimizer,djreep81/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,djreep81/glsl-optimizer,metora/MesaGLSLCompiler,tokyovigilante/glsl-optimizer,jbarczak/glsl-optimizer,mapbox/glsl-optimizer,zz85/glsl-optimizer,benaadams/gls... |
7fcd15e93a1b69b6c2080c3d6090ece787862685 | src/lib/entropy/darwin_secrandom/darwin_secrandom.cpp | src/lib/entropy/darwin_secrandom/darwin_secrandom.cpp | /*
* Darwin SecRandomCopyBytes EntropySource
* (C) 2015 Daniel Seither (Kullo GmbH)
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/internal/darwin_secrandom.h>
#include <Security/Security.h>
#include <Security/SecRandom.h>
namespace Botan {
/**
* Gather entropy from SecRa... | /*
* Darwin SecRandomCopyBytes EntropySource
* (C) 2015 Daniel Seither (Kullo GmbH)
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/internal/darwin_secrandom.h>
#include <Security/Security.h>
#include <Security/SecRandom.h>
namespace Botan {
/**
* Gather entropy from SecRa... | Return 0 bits in Darwin_SecRandom::poll on SecRandomCopyBytes failure | Return 0 bits in Darwin_SecRandom::poll on SecRandomCopyBytes failure
| C++ | bsd-2-clause | webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,randomb... |
03c3546a1c7e1bfca5aade55ebb18f9041a0085f | debug.cpp | debug.cpp | // Copyright (c) 2015 Klaralvdalens Datakonsult AB (KDAB).
// All rights reserved. Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "debug.h"
#include <QString>
#include <QDebug>
#include <iostream>
std::ostream& operator<<(std::ostream& stream, const wch... | // Copyright (c) 2015 Klaralvdalens Datakonsult AB (KDAB).
// All rights reserved. Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "debug.h"
#include <QString>
#include <QDebug>
#include <iostream>
std::ostream& operator<<(std::ostream& stream, const wch... | Make code compile with Qt 5.2 | Make code compile with Qt 5.2
| C++ | bsd-3-clause | KDAB/phantomjs-cef,KDAB/phantomjs-cef,KDAB/phantomjs-cef |
d456f733824569ff63703678b00481cf1742f3dd | runtime/app/cameo_main.cc | runtime/app/cameo_main.cc | // Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cameo/runtime/app/cameo_main_delegate.h"
#include "content/public/app/content_main.h"
#if defined(OS_WIN)
#include "content/public/app/startup... | // Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cameo/runtime/app/cameo_main_delegate.h"
#include "content/public/app/content_main.h"
#if defined(OS_WIN)
#include "content/public/app/startup... | Fix wrongly changed include path when removing cameo/src dir | Fix wrongly changed include path when removing cameo/src dir
| C++ | bsd-3-clause | heke123/crosswalk,ZhengXinCN/crosswalk,minggangw/crosswalk,kurli/crosswalk,dreamsxin/crosswalk,xzhan96/crosswalk,xzhan96/crosswalk,qjia7/crosswalk,PeterWangIntel/crosswalk,myroot/crosswalk,leonhsl/crosswalk,zliang7/crosswalk,seanlong/crosswalk,chuan9/crosswalk,jondwillis/crosswalk,Shouqun/crosswalk,rakuco/crosswalk,bal... |
479423867c386defefc45d497873d5458538a682 | ui/desktop_aura/desktop_factory_ozone_wayland.cc | ui/desktop_aura/desktop_factory_ozone_wayland.cc | // Copyright 2016 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 "ozone/ui/desktop_aura/desktop_factory_ozone_wayland.h"
#include "ozone/ui/desktop_aura/desktop_screen_wayland.h"
#include "ozone/ui/desktop_aur... | // Copyright 2016 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 "ozone/ui/desktop_aura/desktop_factory_ozone_wayland.h"
#include "ozone/ui/desktop_aura/desktop_screen_wayland.h"
#include "ozone/ui/desktop_aur... | Fix multiple definition link error | Fix multiple definition link error
Include desktop_window_tree_host_ozone header instead of its implementation
in desktop_factory_ozone_wayland.cc to solve the following link issue:
obj/ozone/ui/desktop_aura/views.desktop_window_tree_host_ozone.o: In function `views::DesktopWindowTreeHostOzone::AsWindowTreeHost()':... | C++ | bsd-3-clause | 01org/ozone-wayland,01org/ozone-wayland,01org/ozone-wayland,01org/ozone-wayland |
f9003881784024b3277c8c22e5e2f9632209f197 | DirList/main.cpp | DirList/main.cpp | #include <QString>
#include <QDir>
#include <QtCore>
#include <iostream>
int main(int argc, char** argv)
{
//QCoreApplication app(argc, argv);
QDir dir;
dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks);
dir.setSorting(QDir::Size | QDir::Reversed);
QString path = argv[1];
dir.cd(p... | #include <QString>
#include <QDir>
#include <QtCore>
#include <iostream>
int main(int argc, char** argv)
{
QCoreApplication app(argc, argv);
QDir dir;
dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks);
dir.setSorting(QDir::Size | QDir::Reversed);
QString path = argv[1];
dir.cd(pat... | Add QCoreApplication app. Replace return 0 on return app.exec(). | Add QCoreApplication app. Replace return 0 on return app.exec().
| C++ | lgpl-2.1 | BulSV/DirList |
48f7135b09db04f1b452d6a753596f80fb3d122f | core/test/ab-core-test-linear-memory.cpp | core/test/ab-core-test-linear-memory.cpp | #include <Ab/Config.hpp>
#include <Ab/LinearMemory.hpp>
#include <gtest/gtest.h>
namespace Ab::Test {
TEST(LinearMemoryTest, InitAndKill) { LinearMemory m; }
TEST(LinearMemoryTest, GrowThreeTimes) {
LinearMemory m;
for (std::size_t i = 0; i < 3; i++) {
m.grow();
}
}
TEST(LinearMemoryTest, AssignToMemory) {
Li... | #include <Ab/Config.hpp>
#include <Ab/LinearMemory.hpp>
#include <gtest/gtest.h>
namespace Ab::Test {
TEST(LinearMemoryTest, InitAndKill) { LinearMemory m; }
TEST(LinearMemoryTest, GrowThreeTimes) {
LinearMemoryConfig cfg;
cfg.page_count_min = 0;
cfg.page_count_max = 3;
LinearMemory m(cfg);
for (std::size_t i ... | Use LinearMemoryConfig when creating LinearMemory in test | Use LinearMemoryConfig when creating LinearMemory in test
Signed-off-by: Andrew Young <9b1c84997b9b503084a7ab9e0b7da3894895a5c3@gmail.com>
| C++ | apache-2.0 | ab-vm/ab,ab-vm/ab,ab-vm/ab,ab-vm/ab,ab-vm/ab |
de7f25e59d722285a6700370de45efd1d8143293 | SupportSDK/Utilities/TimeUtilities.cpp | SupportSDK/Utilities/TimeUtilities.cpp | #include "stdafx.h"
#include "TimeUtilities.h"
#include <time.h>
namespace SDK
{
namespace Utilities
{
void SleepSeconds(ulong i_seconds)
{
clock_t now = clock();
clock_t limit = now + i_seconds * CLOCKS_PER_SEC;
while ( limit > now )
now = clock();
}
void SleepMiliseconds(ulong i_milis... | #include "stdafx.h"
#include "TimeUtilities.h"
#include <time.h>
#ifdef _WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif
namespace SDK
{
namespace Utilities
{
void SleepSeconds(ulong i_seconds)
{
SleepMiliseconds(i_seconds*1000);
}
void SleepMiliseconds(ulong i_miliseconds)
... | Use standard functions for Linux and Windows | [Utilities] Use standard functions for Linux and Windows
| C++ | mit | TraurigeNarr/SupportSDK,TraurigeNarr/SupportSDK |
811b9aaa9d15c0b0bfc442b5795b73e51037f8af | lib/ReaderWriter/ELF/AMDGPU/AMDGPURelocationHandler.cpp | lib/ReaderWriter/ELF/AMDGPU/AMDGPURelocationHandler.cpp | //===- lib/ReaderWriter/ELF/AMDGPU/AMDGPURelocationHandler.cpp -----------===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-----------------------------------------------------------------... | //===- lib/ReaderWriter/ELF/AMDGPU/AMDGPURelocationHandler.cpp -----------===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-----------------------------------------------------------------... | Add missing: using namespace lld; to try to fix windows bot | ELF/AMDGPU: Add missing: using namespace lld; to try to fix windows bot
git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@246179 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/lld,llvm-mirror/lld |
f6d691c616e387966fba748f23c2edd56f6a6f56 | remoting/host/capturer.cc | remoting/host/capturer.cc | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "remoting/host/capturer.h"
namespace remoting {
Capturer::Capturer()
: width_(0),
height_(0),
pixel_format_(PixelFormatInva... | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "remoting/host/capturer.h"
namespace remoting {
Capturer::Capturer()
: width_(0),
height_(0),
pixel_format_(PixelFormatInva... | Fix undefined assignment evaluation order in remoting::Capturer::FinishCapture. | Coverity: Fix undefined assignment evaluation order in remoting::Capturer::FinishCapture.
CID=10878
BUG=none
TEST=builds
Review URL: http://codereview.chromium.org/2847010
git-svn-id: http://src.chromium.org/svn/trunk/src@50012 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: 0261c625161fafb471c018e572b46d59f... | C++ | bsd-3-clause | meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u... |
f33a9fa205d2c3fa011772c3e24f76f8be6ddd93 | source/globjects/source/implementations/AbstractUniformImplementation.cpp | source/globjects/source/implementations/AbstractUniformImplementation.cpp | #include "AbstractUniformImplementation.h"
#include <globjects/globjects.h>
#include "BindlessUniformImplementation.h"
#include "LegacyUniformImplementation.h"
namespace glo {
AbstractUniformImplementation::AbstractUniformImplementation()
{
}
AbstractUniformImplementation::~AbstractUniformImplementation()
{
}
Abs... | #include "AbstractUniformImplementation.h"
#include <globjects/globjects.h>
#include "BindlessUniformImplementation.h"
#include "LegacyUniformImplementation.h"
namespace glo {
AbstractUniformImplementation::AbstractUniformImplementation()
{
}
AbstractUniformImplementation::~AbstractUniformImplementation()
{
}
Abs... | Fix required extension for bindless uniform setters | Fix required extension for bindless uniform setters
| C++ | mit | cginternals/globjects,hpi-r2d2/globjects,j-o/globjects,hpi-r2d2/globjects,j-o/globjects,cginternals/globjects,j-o/globjects,j-o/globjects |
e143dab9b77d29abc2df70edb51c68f32b9283ea | examples/basic/hackypassabilityagent.cpp | examples/basic/hackypassabilityagent.cpp | #include "hackypassabilityagent.h"
#include <QQuickItem>
#include <QQuickWindow>
#include "quickentity.h"
#include "utils.h"
HackyPassabilityAgent::HackyPassabilityAgent() :
mGridItem(nullptr)
{
}
bool HackyPassabilityAgent::isPassable(const QPointF &pos, AbstractEntity *entity)
{
if (!mGridItem)
re... | #include "hackypassabilityagent.h"
#include <QQuickItem>
#include <QQuickWindow>
#include "quickentity.h"
#include "utils.h"
HackyPassabilityAgent::HackyPassabilityAgent() :
mGridItem(nullptr)
{
}
bool HackyPassabilityAgent::isPassable(const QPointF &pos, AbstractEntity *entity)
{
if (!mGridItem)
re... | Fix null pointer access in HackyPassabilityAgent | Fix null pointer access in HackyPassabilityAgent
| C++ | unlicense | mitchcurtis/quickpather,mitchcurtis/quickpather |
61c3fcba899c91e3ace73635f432df1269dcdfef | Source/Client.cc | Source/Client.cc | #include "Client.hh"
#include <string>
#include "Socket.hh"
#include "http/Response.hh"
#include "http/Request.hh"
#include "methods/Get.hh"
#include "Config.hh"
ss::Client::Client(Socket* socket) : socket(socket)
{
auto request = get_request();
http::Response response;
response.headers["protocol"] = "HTTP/1.1";
... | #include "Client.hh"
#include <string>
#include "Socket.hh"
#include "http/Response.hh"
#include "http/Request.hh"
#include "methods/Get.hh"
#include "Config.hh"
ss::Client::Client(Socket* socket) : socket(socket)
{
auto request = get_request();
http::Response response;
response.headers["protocol"] = "HTTP/1.1";
... | Make while loop more compact | Make while loop more compact
| C++ | mit | matthin/SimpleServer,matthin/SimpleServer |
9b8421c4d8fa5bf1ecc7ffc0a5dea967dbe1bb5e | Modules/SegmentationUI/Qmitk/QmitkToolGUI.cpp | Modules/SegmentationUI/Qmitk/QmitkToolGUI.cpp | /*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty o... | /*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty o... | Add missing keyword to UnRegister definition | Add missing keyword to UnRegister definition
(gcc was complaining)
| C++ | bsd-3-clause | iwegner/MITK,NifTK/MITK,iwegner/MITK,RabadanLab/MITKats,fmilano/mitk,fmilano/mitk,RabadanLab/MITKats,iwegner/MITK,fmilano/mitk,NifTK/MITK,MITK/MITK,MITK/MITK,RabadanLab/MITKats,fmilano/mitk,RabadanLab/MITKats,fmilano/mitk,RabadanLab/MITKats,fmilano/mitk,NifTK/MITK,fmilano/mitk,MITK/MITK,NifTK/MITK,iwegner/MITK,NifTK/MI... |
3d017441c7d8dd065c0b402be043d490e96f09e7 | main.cpp | main.cpp | #include <iostream>
//Thomas' Prototypes
//Hannah's Prototypes
int atomic_distance (int distance); //Kate's Prototype: defines atomic distance as integer
int (main)
{
using nedit file...
create new input "hannah's test changes"
}
| #include <iostream>
//Thomas' Prototypes
//Hannah's Prototypes
int atomic_distance (int x, int y, int z); //Kate's Prototype: defines atomic distance as combination of x, y, z coordinates
int (main)
{
using nedit file...
create new input "hannah's test changes"
}
| Update to Kate's First Function Prototype | Update to Kate's First Function Prototype | C++ | mit | kchrbnnt/chemistry_structure_shit,kchrbnnt/chemistry_structure_shit |
d0001a5d4727367f7cc59437dd02d667e9943cac | base/native_library_linux.cc | base/native_library_linux.cc | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/native_library.h"
#include <dlfcn.h>
#include "base/file_path.h"
#include "base/logging.h"
namespace base {
// static
NativeLibrary... | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/native_library.h"
#include <dlfcn.h>
#include "base/file_path.h"
#include "base/logging.h"
namespace base {
// static
NativeLibrary... | Use RTLD_DEEPBIND to make sure plugins don't use Chrome's symbols instead of their own | Use RTLD_DEEPBIND to make sure plugins don't use Chrome's symbols instead of their own
Review URL: http://codereview.chromium.org/112030
Patch from Antoine Labour <piman@google.com>.
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@16278 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | robclark/chromium,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,ltilve/chromium,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,Jonekee/chromium.src,M4sse/chromium.src,dushu1203/chromium.src,lti... |
7ce8843796f345c115ce8613b11e91bca71f32a4 | App/Console/Source/Main.cpp | App/Console/Source/Main.cpp | #include "KAI/Console/Console.h"
#include <iostream>
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#endif
using namespace std;
USING_NAMESPACE_KAI
//static Color _color;
int main(int argc, char **argv)
{
KAI_UNUSED_2(argc, argv);
cout << "pyro v0.1" << endl;
Console console;
console.SetLang... | #include <KAI/Console/Console.h>
#include <iostream>
using namespace std;
USING_NAMESPACE_KAI
int main(int argc, char **argv)
{
KAI_UNUSED_2(argc, argv);
cout << "KAI v0.1" << endl;
Console console;
console.SetLanguage(Language::Pi);
// the higher the number, the greater the verbosity of debug output
Proces... | Remove explicit WIN32 references from Console app. | Remove explicit WIN32 references from Console app.
| C++ | mit | cschladetsch/KAI,cschladetsch/KAI,cschladetsch/KAI |
e9a0f8d1eaacaa02880a7f78577c260fdba68cf5 | Sources/Rosetta/Tasks/SimpleTasks/RemoveEnchantmentTask.cpp | Sources/Rosetta/Tasks/SimpleTasks/RemoveEnchantmentTask.cpp | // This code is based on Sabberstone project.
// Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva
// RosettaStone is hearthstone simulator using C++ with reinforcement learning.
// Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon
#include <Rosetta/Models/Enchantment.hpp>
#include <Rosetta/Ta... | // This code is based on Sabberstone project.
// Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva
// RosettaStone is hearthstone simulator using C++ with reinforcement learning.
// Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon
#include <Rosetta/Models/Enchantment.hpp>
#include <Rosetta/Ta... | Add code to remove effects | feat(card-impl): Add code to remove effects
| C++ | mit | Hearthstonepp/Hearthstonepp,Hearthstonepp/Hearthstonepp |
5e1185b753e9bd72282e26711f06e8c82f897e36 | src/main.cpp | src/main.cpp | #include <boost/log/trivial.hpp>
#include <boost/program_options.hpp>
#include <dsnutil/log/init.h>
namespace po = boost::program_options;
int main(int argc, char** argv)
{
dsn::log::init();
try {
po::options_description descr;
descr.add_options()("help,?", "Display list of valid arguments")... | #include <iostream>
#include <boost/log/trivial.hpp>
#include <boost/program_options.hpp>
#include <dsnutil/log/init.h>
#include <build-bot/bot.h>
namespace po = boost::program_options;
int main(int argc, char** argv)
{
dsn::log::init();
std::string configFile;
try {
po::options_description des... | Add parameter for config file | Add parameter for config file
| C++ | bsd-3-clause | png85/build-bot |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.